Since not all platforms guarantee that String always uses UTF-8 encoding, you can use this cross-platform API to perform operations on such strings.

Constructor

new(?size:Int)

Allocate a new Utf8 buffer using an optional bytes size.

Methods

addChar(c:Int):Void

Add the given UTF8 character code to the buffer.

@:has_untypedtoString():String

Returns the buffer converted to a String.