Difference between revisions of "LlToLower"

From Second Life Wiki
Jump to navigation Jump to search
(works for most basic non-7-bit characters, but fails for 1160 out of 1791 characters tagged as "uppercase")
 
(25 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{LSL Function
{{Issues/SVC-3760}}{{LSL_Function
|func_id=98
|func_id=98|func_sleep=0.0|func_energy=10.0
|func_sleep=0.0
|func_energy=10.0
|func=llToLower
|func=llToLower
|return_type=string
|return_type=string|p1_type=string|p1_name=src
|p1_type=string
|func_footnote=The opposite is [[llToUpper]].
|p1_name=source
|func_desc
|return_text=returns '''source''' with all lower-case letters
|return_text=that is '''src''' with all lower-case letters
|}}
|spec
[[Category:LSL Functions|String to lower]]
|caveats=*There is no Linden Library "llToProperCase", which would return ''[http://en.wikipedia.org/wiki/Sentence_case correctly]'' capitalized strings; However, there are user functions that do this: [[User:Fred_Gandt/Scripts/Functions#ToNormal|ToNormal]]
[[Category:LSL Stub]]
*The function also works for many characters outside the 7-bit ASCII range, especially latin, cyrillic and greek, but not all characters tagged as "uppercase" in the Unicode specification are converted.
|constants
|examples=
<source lang="lsl2">string msg = "I like CANDY!";
string p = llToLower(msg);
llOwnerSay(p);//Will say "i like candy!"</source>
|helpers
|also_functions={{LSL DefineRow||[[llToUpper]]}}
|also_tests
|also_events
|also_articles
|notes
|cat1=String
|cat2
|cat3
|cat4
}}

Latest revision as of 09:16, 16 October 2023

Summary

Function: string llToLower( string src );

Returns a string that is src with all lower-case letters

• string src

The opposite is llToUpper.

Caveats

  • There is no Linden Library "llToProperCase", which would return correctly capitalized strings; However, there are user functions that do this: ToNormal
  • The function also works for many characters outside the 7-bit ASCII range, especially latin, cyrillic and greek, but not all characters tagged as "uppercase" in the Unicode specification are converted.
All Issues ~ Search JIRA for related Bugs

Examples

string msg = "I like CANDY!";
string p = llToLower(msg);
llOwnerSay(p);//Will say "i like candy!"

See Also

Functions

•  llToUpper

Deep Notes

All Issues

~ Search JIRA for related Issues
   Unicode behavior of llToUpper and llToLower is inconsistent and broken

Signature

function string llToLower( string src );