Available on all platforms
This abstract provides consistent cross-target unicode support.
See also:
staticvalidate(b:Bytes, encoding:Encoding):BoolTells if b is a correctly encoded UTF8 byte sequence.
read onlylength:IntAvailable on cs, js, cpp, java, hl, flash
The number of characters in this String.
charAt(index:Int):StringAvailable on cs, js, cpp, java, hl, flash
Returns the character at position index of this String.
If index is negative or exceeds this.length, the empty String "" is returned.
charCodeAt(index:Int):Null<Int>Available on cs, js, cpp, java, hl, flash
Returns the character code at position index of this String.
If index is negative or exceeds this.length, null is returned.
indexOf(str:String, ?startIndex:Int):IntAvailable on cs, js, cpp, java, hl, flash
Returns the position of the leftmost occurrence of str within this String.
If startIndex is given, the search is performed within the substring of this String starting from startIndex (if startIndex is posivite or 0) or max(this.length + startIndex, 0) (if startIndex is negative).
If startIndex exceeds this.length, -1 is returned.
Otherwise the search is performed within this String. In either case, the returned position is relative to the beginning of this String.
If str cannot be found, -1 is returned.
inlineiterator():StringIteratorUnicodeAvailable on cs, php, js, cpp, macro, java, lua, python, hl, flash
Returns an iterator of the unicode code points.
inlinekeyValueIterator():StringKeyValueIteratorUnicodeAvailable on cs, php, js, cpp, macro, java, lua, python, hl, flash
Returns an iterator of the code point indices and unicode code points.
lastIndexOf(str:String, ?startIndex:Int):IntAvailable on cs, js, cpp, java, hl, flash
Returns the position of the rightmost occurrence of str within this String.
If startIndex is given, the search is performed within the substring of this String from 0 to startIndex + str.length. Otherwise the search is performed within this String. In either case, the returned position is relative to the beginning of this String.
If str cannot be found, -1 is returned.
substr(pos:Int, ?len:Int):StringAvailable on cs, js, cpp, java, hl, flash
Returns len characters of this String, starting at position pos.
If len is omitted, all characters from position pos to the end of this String are included.
If pos is negative, its value is calculated from the end of this String by this.length + pos. If this yields a negative value, 0 is used instead.
If the calculated position + len exceeds this.length, the characters from that position to the end of this String are returned.
If len is negative, the result is unspecified.
substring(startIndex:Int, ?endIndex:Int):StringAvailable on cs, js, cpp, java, hl, flash
Returns the part of this String from startIndex to but not including endIndex.
If startIndex or endIndex are negative, 0 is used instead.
If startIndex exceeds endIndex, they are swapped.
If the (possibly swapped) endIndex is omitted or exceeds this.length, this.length is used instead.
If the (possibly swapped) startIndex exceeds this.length, the empty String "" is returned.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/UnicodeString.html