Difference between revisions of "LlToUpper"

From Second Life Wiki
Jump to navigation Jump to search
(I happen to like "src" over "source")
(same as llToLower, works mostly for basic unicode, fails for 1561 out of 2155 characters)
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{LSL_Function
{{Issues/SVC-3760}}{{LSL_Function
|func_id=97|func_sleep=0.0|func_energy=10.0
|func_id=97|func_sleep=0.0|func_energy=10.0
|func=llToUpper
|func=llToUpper
|return_type=string|p1_type=string|p1_name=src
|return_type=string|p1_type=string|p1_name=src
|func_footnote
|func_footnote=The opposite is [[llToLower]].
|func_desc
|func_desc
|return_text=that is '''src''' with all upper-case characters.
|return_text=that is '''src''' with all upper-case characters.
|spec
|spec
|caveats
|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]]
*The function also works for many characters outside the 7-bit ASCII range, especially latin, cyrillic and greek, but not all characters tagged as "lowercase" in the Unicode specification are converted.
|constants
|constants
|examples=<pre>
|examples=
string msg = "I like CANDY!";
<source lang="lsl2">string msg = "I like candy!";
string p = llToLower(msg);
string p = llToUpper(msg);
llOwnerSay(p);//Will say "i like candy!"
llOwnerSay(p);//Will say "I LIKE CANDY!"</source>
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llToLower]]}}
|also_functions={{LSL DefineRow||[[llToLower]]}}
Line 19: Line 19:
|also_events
|also_events
|also_articles
|also_articles
|notes=This may only work on characters in the ASCII7 range.
|cat1=String
|cat1=String
|cat2
|cat2

Latest revision as of 08:17, 16 October 2023

Summary

Function: string llToUpper( string src );
0.0 Forced Delay
10.0 Energy

Returns a string that is src with all upper-case characters.

• string src

The opposite is llToLower.

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 "lowercase" in the Unicode specification are converted.

Examples

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

See Also

Functions

•  llToLower

Deep Notes

Signature

function string llToUpper( string src );