LlBase64ToString
From Second Life Wiki
(Redirected from LSL llBase64ToString)
| LSL Portal | | | Functions | | | Events | | | Types | | | Operators | | | Constants | | | Flow Control | | | Script Library | | | Tutorials |
Description
Function: string llBase64ToString( string str );| 261 | Function ID |
| 0.0 | Delay |
| 10.0 | Energy |
Returns a string that is the Base64 str decoded into a conventional string.
| • string | str | – | Base64 string |
Caveats
- If the conversion creates any unprintable characters, they are converted to spaces.
- Converts invalid characters into question marks ('?').
Examples
default { state_entry() { string test = llBase64ToString("U2VjcmV0Ok9wZW4="); llSay(0,test ); } }
This can be used in Basic Authentication, such as this login:
GET / HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2) Host: www.example.com Authorization: Basic U2VjcmV0Ok9wZW4=
llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

