-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Tcl/Tk 8.5 Programming Cookbook
The second keyword that Tcl provides to alter the case of a string is totitle. As its name implies, the totitle keyword returns a string with the first Unicode character capitalized.
The syntax of the string command is as follows:
string totitle string first last
When invoked with the totitle keyword the string command will convert the value stored in string to its title equivalent.
In the following example, we will convert a string that contains only lowercase characters to its title case. Return values from the commands are provided for clarity. Enter the following command:
% string totitle "john" John
The title command converts the first character of a string to its Unicode title case variant. If no title variant exists, it is converted to uppercase. If an optional index value is passed in the first location, the conversion will commence at that location. If an index value is passed in the last location, this will designate the location...
Change the font size
Change margin width
Change background colour