Difference between revisions of "LlStringToBase64"
Jump to navigation
Jump to search
Pedro Oval (talk | contribs) (Note that it uses UTF-8) |
|||
Line 2: | Line 2: | ||
|func_id=260|func_sleep=0.0|func_energy=10.0 | |func_id=260|func_sleep=0.0|func_energy=10.0 | ||
|func=llStringToBase64|return_type=string|p1_type=string|p1_name=str | |func=llStringToBase64|return_type=string|p1_type=string|p1_name=str | ||
|func_footnote=To go in the other direction, use [[llBase64ToString]]. | |func_footnote=If extra bits are needed to complete the last base64 symbol, those extra bits will be zero.<br>To go in the other direction, use [[llBase64ToString]]. | ||
|func_desc | |func_desc | ||
|Return_text={{LSLGC|Base64}} representation of the {{LSLPT|str}} interpreted as an UTF-8 byte sequence | |Return_text={{LSLGC|Base64}} representation of the {{LSLPT|str}} interpreted as an UTF-8 byte sequence | ||
Line 8: | Line 8: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples | |examples= | ||
<lsl>integer getStringBytes(string msg) { | |||
return (llStringLength((string)llParseString2List(llStringToBase64(msg), ["="], [])) * 3) >> 2; | |||
}</lsl> | |||
|helpers | |helpers | ||
|also_functions= | |also_functions= |
Revision as of 22:25, 4 February 2014
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
<lsl>integer getStringBytes(string msg) {
return (llStringLength((string)llParseString2List(llStringToBase64(msg), ["="], [])) * 3) >> 2;}</lsl>
See Also
Functions
• | llBase64ToString | |||
• | llBase64ToInteger | |||
• | llIntegerToBase64 | |||
• | llXorBase64 |