To lower case: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle Created page with '{{ #vardefine:name|to_lower_case}}{{ #vardefine:return_type|string}}{{ FunctionPage| name={{#var:name}}| function_category=String Handling Routines| function1={{Function| name=…' |
imported>Bale mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
Line 16: | Line 14: | ||
}}| | }}| | ||
function_description=Converts all upper-case alphabetic characters (A-Z) found in {{pspan|text}} to their lower-case equivalents (a-z) and returns the resulting string.| | function_description=Converts all upper-case alphabetic characters (A-Z) found in {{pspan|text}} to their lower-case equivalents (a-z) and returns the resulting string. Characters with diacritic marks such as Ñ and Á will also be converted to lower-case letters such as ñ and á.| | ||
code1={{CodeSample| | code1={{CodeSample| | ||
Line 33: | Line 31: | ||
see_also={{SeeAlso|to_upper_case}}| | see_also={{SeeAlso|to_upper_case}}| | ||
}} | }} | ||
[[Category:String Handling Routines]] |
Latest revision as of 05:08, 22 May 2010
Function Syntax
string to_lower_case(string text )
- text is the original string
Converts all upper-case alphabetic characters (A-Z) found in text to their lower-case equivalents (a-z) and returns the resulting string. Characters with diacritic marks such as Ñ and Á will also be converted to lower-case letters such as ñ and á.
Code Sample
Turns "shouted" text into easier-to-read text.
string s = "HI I AM A NIGERIAN PRINCE, WOULD YOU LIKE 1 MILLION US DOLLAR?";
s = to_lower_case(s);
print(s);
Returns:
hi i am a nigerian prince, would you like 1 million us dollar?