Lowercase
Lowercase ( aString {; *} ) : Text
Parameter | Type | Description | |
---|---|---|---|
aText | Text | → | String to convert to lowercase |
* | Operator | → | If passed: keep accents |
Function result | Text | ← | String in lowercase |
Description
Lowercase takes aString and returns the string with all alphabetic characters in lowercase.
The optional * parameter, if passed, indicates that any accented characters present in aString must be returned as accented lowercase characters. By default, when this parameter is omitted, accented characters “lose” their accents after the conversion is carried out.
Example 1
The following project method capitalizes the string or text received as parameter. For instance, Caps ("john") would return "John".
//Caps project method
//Caps ( String ) -> String
//Caps ( Any text or string ) -> Capitalized text
$0:=Lowercase($1)
If(Length($0)>0)
$0[[1]]:=Uppercase($0[[1]])
End if
Example 2
This example compares the results obtained according to whether or not the * parameter has been passed:
$thestring:=Lowercase("DÉJÀ VU") // $thestring is "deja vu"
$thestring:=Lowercase("DÉJÀ VU";*) // $thestring is "déjà vu"
See also
Properties
Command number | 14 |
Thread safe | ✓ |