Variables

read onlylength:Int

Methods

inline charAt (index:Int):Utf8

Returns the character as a String at position index of this.

codePointAt (index:Int):Int

Returns the Unicode code point at position index of this.

codePointCount (beginIndex:Int, endIndex:Int):Int

Returns the number of Unicode code points from beginIndex to endIndex in this.

inline codePointWidthAt (index:Int):Int

Returns the number of units of the code point at position index of this.

inline codePointWidthBefore (index:Int):Int

Returns the number of units of the code point before position index of this.

inline codeUnitAt (index:Int):Int

Returns the UTF-8 code unit at position index of this.

inline offsetByCodePoints (index:Int, codePointOffset:Int):Int

Returns the index within this that is offset from position index by codePointOffset code points.

inline substr (index:Int, ?len:Int):Utf8

Returns len code units of this, starting at position pos.

inline toBytes ():Bytes

inline toString ():String

validate ():Void

Validates this Utf8 string.

If the code unit sequence of this is invalid, Exception.InvalidCodeUnitSequence is throwed.

Static methods

staticinline encodeWith (f:Int ‑> Void, c:Int):Void

staticinline fromBytes (b:Bytes):Utf8

staticinline fromCodePoint (codePoint:Int):Utf8

Converts the code point code to a character as a Utf8 string.

staticinline fromCodePoints (codePoints:Iterable<Int>):Utf8

Converts codePoints to a Utf8 string.

staticinline fromString (s:String):Utf8