Manual:DIL Manual/toupper()
Jump to navigation
Jump to search
toupper()
Function (string). Returns a string in upper case.
toupper(s : string)
Returns a copy of s with every small letter made a capital:
toupper("hello!") is "HELLO!". s itself is not changed.
Parameters
| Name | Type | Meaning |
|---|---|---|
| s | string | The string. |
Returns
String: s in upper case; "" for an empty string or one never set.
Notes
- Only the letters a to z change; letters outside ASCII stay as they are.
- To capitalise only the first letter, combine it with left() and
right() as in the example.
Example
dilbegin string capital(s : string);
code
{
return(toupper(left(s, 1)) + right(s, length(s) - 1));
}
dilend
Returns the string with its first letter a capital, as helpzon.zon does with a help topic.