Next: , Previous: , Up: string   [Contents]


8.2.57.10 string.encode

Method: out = encode (obj, charsetName)

Encode string in a given character encoding.

obj must be scalar.

charsetName (charvec) is the name of a character encoding. (TODO: Document what determines the set of valid encoding names.)

Returns the encoded string as a uint8 vector.

See also: string.decode.