class haxe.Utf8
Available on all platforms
Since all platforms does not guarantee that String always uses UTF-8 encoding, you can use this crossplatform API to perform operations on such strings.
Class Fields
static function charCodeAt(s:String, index:Int):Int
Similar to String.charCodeAt
but uses the UTF8 character position.
static function decode(s:String):String
Decode an UTF8 string back to an ISO string. Throw an exception if a given UTF8 character is not supported by the decoder.
static function iter(s:String, chars:Int ->Void):Void
Call the chars
function for each UTF8 char of the string.
static function sub(s:String, pos:Int, len:Int):String
This is similar to String.substr
but the pos
and len
parts are considering UTF8 characters.