Difference between revisions of "LlOrd"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{LSL Function |func_sleep=0.0|func_energy=10.0 |func=llOrd|sort=Ord |func_desc=Calculate the ordinal value for a character in a string. |return_type=integer |p1_type=string|p...")
 
Line 9: Line 9:
|p2_hover=Index of character ordinal to retrieve.
|p2_hover=Index of character ordinal to retrieve.
|return_text=
|return_text=
|func_footnote=The returned value is the UTF-16 value of the character at the specified index.
|func_footnote=The returned value is the UTF-32 value of the character at the specified index.
|spec
|spec
|caveats
|caveats
Line 17: Line 17:
{{LSL DefineRow|[[llChar]]|Convert an ordinal into a character}}
{{LSL DefineRow|[[llChar]]|Convert an ordinal into a character}}
{{LSL DefineRow|[[llHash]]|Calculate a 32bit hash for a string}}
{{LSL DefineRow|[[llHash]]|Calculate a 32bit hash for a string}}
|also_articles={{LSL DefineRow||{{wikipedia|UTF-16}}|}}
|also_articles={{LSL DefineRow||{{wikipedia|UTF-32}}|}}
|notes
|notes
|cat1=Math/Trigonometry
|cat1
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 12:53, 5 May 2021

Summary

Function: integer llOrd( string val, integer index );

Calculate the ordinal value for a character in a string.
Returns an integer

• string val Source string for character ordinal.
• integer index Index of character ordinal to retrieve.

The returned value is the UTF-32 value of the character at the specified index.

Examples

See Also

Functions

• llChar Convert an ordinal into a character
• llHash Calculate a 32bit hash for a string

Articles

•  "Wikipedia logo"UTF-32

Deep Notes

Search JIRA for related Issues

Signature

function integer llOrd( string val, integer index );