Use Unifill.uLength() in UTF8String get_length()
If the String isn't a valid UTF8 string haxe.Utf8.length() will throw a cryptic "Invalid UTF8" error while Unifill.uLength() will return 0
This commit is contained in:
@@ -359,7 +359,7 @@ abstract UTF8String(String) from String to String {
|
||||
|
||||
@:noCompletion private function get_length ():Int {
|
||||
|
||||
return this == null ? 0 : Utf8.length (this);
|
||||
return this == null ? 0 : Unifill.uLength (this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user