Core Function LC
From Sputnik Wiki
(Difference between revisions)
(→Example) |
(→Example) |
||
| (2 intermediate revisions by one user not shown) | |||
| Line 28: | Line 28: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
$value = "TESTing"; | $value = "TESTing"; | ||
| − | Println($value); // Prints | + | Println($value); // Prints testing |
// Modify the string in place | // Modify the string in place | ||
| − | + | my $n = StrLen($value); | |
| + | my $i = 0; | ||
| + | while ($n-- > 0) | ||
{ | { | ||
| − | + | $value[$i] = LC($value[$i]); | |
| − | + | $i++; | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
} | } | ||
// All done | // All done | ||
Latest revision as of 09:57, 19 September 2015
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 my $n = StrLen($value); my $i = 0; while ($n-- > 0) { $value[$i] = LC($value[$i]); $i++; } // All done Println($value); // Prints testing