string toupper
Gives a string with its letters in uppercase.
string toupper STRING ?FIRST? ?LAST?
Description
Gives STRING with each lowercase letter changed to uppercase, one character at a time: a letter that becomes two letters in a full case change, such as ß, stays as it is. FIRST and LAST follow the rules of string tolower.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| STRING | string | required | The text to change. |
| FIRST | index | 0 | The index of the first character to change. |
| LAST | index | FIRST, or end with no FIRST | The index of the last character to change. |
Returns
The new string.
Examples
% string toupper abc
ABC
% string toupper abc 0 0
Abc
% string toupper straße
STRAßE
% string toupper abc 2 1
abc
Errors
% string toupper
wrong # args: should be "string toupper string ?first? ?last?"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1