FixIO Documentation

Back to summary

Extension methods

Charset conversion

import "io/charset";

static function String::from_native(arr: Byte[]): String
static function String::from_native(arr: Byte[], off: Integer, len: Integer): String
static function String::from_native(s: String, arr: Byte[]): String
static function String::from_native(s: String, arr: Byte[], off: Integer, len: Integer): String
Returns a string from a byte array that is decoded from native charset used by the OS. Optionally it can append it to an existing string.
static function String::to_native(arr: Byte[], s: String): Byte[]
static function String::to_native(arr: Byte[], s: String, off: Integer, len: Integer): Byte[]
Appends a string that is encoded to native charset used by the OS to the provided byte array. The array is returned.
function String::to_native(): Byte[]
function String::to_native(off: Integer, len: Integer): Byte[]
Returns a byte array from a string that is encoded to native charset used by the OS.