Core Function LC
From Sputnik Wiki
(Difference between revisions)
(→Example) |
(→Example) |
||
Line 29: | Line 29: | ||
$value = "TESTing"; | $value = "TESTing"; | ||
Println($value); // Prints TESTing | Println($value); // Prints TESTing | ||
− | $value-> | + | // Modify the string in place |
+ | fixed ($p = $value) | ||
+ | { | ||
+ | my $n = StrLen($value); | ||
+ | my $i = 0; | ||
+ | while ($n-- > 0) | ||
+ | { | ||
+ | $p[$i] = LC($p[$i]); | ||
+ | $i++; | ||
+ | } | ||
+ | } | ||
+ | // All done | ||
Println($value); // Prints testing | Println($value); // Prints testing | ||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 17:45, 10 August 2014
LC( <expression> )
Contents |
Description
Returns string in all lower case.
Parameters
expression
The string to use.
Return Value
Uppercase string.
Example
$result = LC("TESTING"); Println("Result:" , $result); // Prints testing
Modify the string in place
$value = "TESTing"; Println($value); // Prints TESTing // Modify the string in place fixed ($p = $value) { my $n = StrLen($value); my $i = 0; while ($n-- > 0) { $p[$i] = LC($p[$i]); $i++; } } // All done Println($value); // Prints testing