**Modifying Strings - tolower, toupper, trim, format** !!!!!! '''[Tcl Tutorial Lesson 18%|%Previous lesson%|%]''' | '''[Tcl Tutorial Index%|%Index%|%]''' | '''[Tcl Tutorial Lesson 20%|%Next lesson%|%]''' !!!!!! These are the commands which modify a string. Note that none of these modify the string in place. In all cases a new string is returned. `string` `tolower` `string` '''''': Returns `string` with all the letters converted from upper to lower case. `string` `toupper` `string` '''''': Returns `string` with all the letters converted from lower to upper case. `string` `trim` `string` `?trimChars?` '''''': Returns `string` with all occurrences of `trimChars` removed from both ends. By default `trimChars` are whitespace (spaces, tabs, newlines). Note that the characters are not treated as a "block" of characters - in other words, `string trim "davidw" dw` would return the string `avi` and not `davi`. `string` `trimleft` `string` `?trimChars?` '''''': Returns `string` with all occurrences of `trimChars` removed from the left. By default `trimChars` are whitespace (spaces, tabs, newlines) `string` `trimright` `string` `?trimChars?` '''''': Returns `string` with all occurrences of `trimChars` removed from the right. By default `trimChars` are whitespace (spaces, tabs, newlines) `format` `formatString` `?arg1 arg2 ... argN?`