Difference between revisions of "LlStringToBase64"
Jump to navigation
Jump to search
Lady Sumoku (talk | contribs) m (Replaced old <LSL> block with <source lang="lsl2">) |
|||
Line 9: | Line 9: | ||
|constants | |constants | ||
|examples= | |examples= | ||
< | <source lang="lsl2">integer getStringBytes(string msg) { | ||
return (llStringLength((string)llParseString2List(llStringToBase64(msg), ["="], [])) * 3) >> 2; | return (llStringLength((string)llParseString2List(llStringToBase64(msg), ["="], [])) * 3) >> 2; | ||
}</ | }</source> | ||
|helpers | |helpers | ||
|also_functions= | |also_functions= |
Latest revision as of 12:38, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llStringToBase64( string str );260 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns the string Base64 representation of the str interpreted as an UTF-8 byte sequence
• string | str |
If extra bits are needed to complete the last base64 symbol, those extra bits will be zero.
To go in the other direction, use llBase64ToString.
Caveats
Examples
integer getStringBytes(string msg) {
return (llStringLength((string)llParseString2List(llStringToBase64(msg), ["="], [])) * 3) >> 2;
}
See Also
Functions
• | llBase64ToString | |||
• | llBase64ToInteger | |||
• | llIntegerToBase64 | |||
• | llXorBase64 |