Difference between revisions of "LlIntegerToBase64"
Jump to navigation
Jump to search
If you are looking for full Unicode translation, not just ASCII7 see: Combined_Library
m (<lsl> tag to <source>) |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LSL_Function | ||
|func_id=280|func_sleep=0.0|func_energy=10.0 | |||
|func=llIntegerToBase64|return_type=string|p1_type=integer|p1_name=number | |||
|func_footnote | |||
|func_desc | |||
|return_text=that is a {{LSLGC|Base64}} big endian encode of '''number''' | |||
|spec | |||
|caveats | |||
|constants | |||
|examples=<source lang="lsl2">string ASCII7ToString(integer letter) | |||
{ | |||
if(letter >= 0x80 || letter < 0) return "";//Not valid ascii7 character | |||
return llBase64ToString(llIntegerToBase64(letter << 24)); | |||
}</source> | |||
If you are looking for full Unicode translation, not just ASCII7 see: [[Combined_Library#Unicode_Integer_to_UTF8|Combined_Library]] | |||
|helpers | |||
|also_functions= | |||
{{LSL DefineRow||[[llBase64ToInteger]]}} | |||
{{LSL DefineRow||[[llBase64ToString]]}} | |||
{{LSL DefineRow||[[llStringToBase64]]}} | |||
|also_events | |||
|also_tests | |||
|also_articles | |||
|notes=Only the first 6 of the 8 characters returned are needed to decoded it back into an integer. | |||
|cat1=Base64 | |||
|cat2=Encoding | |||
|cat3 | |||
|cat4 | |||
}} |
Revision as of 11:32, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llIntegerToBase64( integer number );280 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is a Base64 big endian encode of number
• integer | number |
Caveats
Examples
string ASCII7ToString(integer letter)
{
if(letter >= 0x80 || letter < 0) return "";//Not valid ascii7 character
return llBase64ToString(llIntegerToBase64(letter << 24));
}
Notes
Only the first 6 of the 8 characters returned are needed to decoded it back into an integer.
See Also
Functions
• | llBase64ToInteger | |||
• | llBase64ToString | |||
• | llStringToBase64 |