Documentation
¶
Overview ¶
Provides data transformation and encoding utility functions.
Index ¶
- func Advanced() class
- func Base64ToRaw(base64_str string) []byte
- func Base64ToUtf8(base64_str string) string
- func Base64ToVariant(base64_str string, allow_objects bool) any
- func RawToBase64(array []byte) string
- func Utf8ToBase64(utf8_str string) string
- func VariantToBase64(v any, full_objects bool) string
- type Extension
- type ID
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func Base64ToRaw ¶
Returns a decoded []byte corresponding to the Base64-encoded string 'base64_str'.
func Base64ToUtf8 ¶
Returns a decoded string corresponding to the Base64-encoded string 'base64_str'.
func Base64ToVariant ¶
Returns a decoded any corresponding to the Base64-encoded string 'base64_str'. If 'allow_objects' is true, decoding objects is allowed.
Internally, this uses the same decoding mechanism as the @GlobalScope.BytesToVar method.
Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
func RawToBase64 ¶
Returns a Base64-encoded string of a given []byte.
func Utf8ToBase64 ¶
Returns a Base64-encoded string of the UTF-8 string 'utf8_str'.
func VariantToBase64 ¶
Returns a Base64-encoded string of the any 'variant'. If 'full_objects' is true, encoding objects is allowed (and can potentially include code).
Internally, this uses the same encoding mechanism as the @GlobalScope.VarToBytes method.
Types ¶
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.