Difference between revisions of "LlIntegerToBase64"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
Line 8: Line 8:
|caveats
|caveats
|constants
|constants
|examples=<lsl>string ASCII7ToString(integer letter)
|examples=<source lang="lsl2">string ASCII7ToString(integer letter)
{
{
     if(letter >= 0x80 || letter < 0) return "";//Not valid ascii7 character
     if(letter >= 0x80 || letter < 0) return "";//Not valid ascii7 character
     return llBase64ToString(llIntegerToBase64(letter << 24));
     return llBase64ToString(llIntegerToBase64(letter << 24));
}</lsl>
}</source>
If you are looking for full Unicode translation, not just ASCII7 see: [[Combined_Library#Unicode_Integer_to_UTF8|Combined_Library]]
If you are looking for full Unicode translation, not just ASCII7 see: [[Combined_Library#Unicode_Integer_to_UTF8|Combined_Library]]
|helpers
|helpers

Revision as of 10:32, 22 January 2015

Summary

Function: string llIntegerToBase64( integer number );
0.0 Forced Delay
10.0 Energy

Returns a string that is a Base64 big endian encode of number

• integer number

Examples

string ASCII7ToString(integer letter)
{
    if(letter >= 0x80 || letter < 0) return "";//Not valid ascii7 character
    return llBase64ToString(llIntegerToBase64(letter << 24));
}
If you are looking for full Unicode translation, not just ASCII7 see: Combined_Library

Notes

Only the first 6 of the 8 characters returned are needed to decoded it back into an integer.

See Also

Deep Notes

Signature

function string llIntegerToBase64( integer number );