js var encoder = new TextEncoder() let originalStr = "\u223e\u0020\u0045\u22c5\u0064\u0061\u0020\u003d\u0020\u0051" let encodedArr = encoder.encode(originalStr) print("encodedArr="+encodedArr) // result is [226,136,190,32,69,226,139,133,100,97]
Encodes and saves the value into the result array.
Parameters
value: string
result: Uint8Array
Returns void
Since
Lens Scripting Version 306
StaticgetTypeName
getTypeName():string
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns string
Since
Lens Scripting Version 305
getTypeName
getTypeName():string
Returns the name of this object's type.
Returns string
isOfType
isOfType(type:string):boolean
Returns true if the object matches or derives from the passed in type.
Contains methods for Text encoding
Since
Lens Scripting Version 305
Example
js var encoder = new TextEncoder() let originalStr = "\u223e\u0020\u0045\u22c5\u0064\u0061\u0020\u003d\u0020\u0051" let encodedArr = encoder.encode(originalStr) print("encodedArr="+encodedArr) // result is [226,136,190,32,69,226,139,133,100,97]