.decodeUTF16()

Description

decodeUTF16 converts a UTF-16 encoded string back to its original string representation.

Parameters

decodeUTF16 takes no parameters.

Usage On Strings

// Encode and decode a string
original = "Hello 🌟"
encoded = original.encodeUTF16()
decoded = encoded.decodeUTF16()
log decoded
// "Hello 🌟"

// Works with any valid UTF-16 encoded string
encoded = someUTF16EncodedString
decoded = encoded.decodeUTF16()
// Returns original string

Last updated

Was this helpful?