|
@@ -5,7 +5,7 @@ abstract UString(String) from String to String {
|
|
public var length(get,never) : Int;
|
|
public var length(get,never) : Int;
|
|
|
|
|
|
inline function get_length() : Int {
|
|
inline function get_length() : Int {
|
|
- #if (flash || js)
|
|
|
|
|
|
+ #if (flash || js || hl)
|
|
return this.length;
|
|
return this.length;
|
|
#else
|
|
#else
|
|
return haxe.Utf8.length( this );
|
|
return haxe.Utf8.length( this );
|
|
@@ -17,15 +17,15 @@ abstract UString(String) from String to String {
|
|
}
|
|
}
|
|
|
|
|
|
public inline function charCodeAt( pos : Int ) : Int {
|
|
public inline function charCodeAt( pos : Int ) : Int {
|
|
- #if (flash || js)
|
|
|
|
|
|
+ #if (flash || js || hl)
|
|
return this.charCodeAt( pos );
|
|
return this.charCodeAt( pos );
|
|
#else
|
|
#else
|
|
return haxe.Utf8.charCodeAt( this, pos );
|
|
return haxe.Utf8.charCodeAt( this, pos );
|
|
#end
|
|
#end
|
|
}
|
|
}
|
|
|
|
|
|
- public inline function substr( pos : Int, #if flash len = 0x7fffffff #else ?len : Int #end ) : UString {
|
|
|
|
- #if (flash || js)
|
|
|
|
|
|
+ public inline function substr( pos : Int, #if (flash || hl || cpp) len = 0x7fffffff #else ?len : Int #end ) : UString {
|
|
|
|
+ #if (flash || js || hl)
|
|
return this.substr( pos, len );
|
|
return this.substr( pos, len );
|
|
#else
|
|
#else
|
|
return haxe.Utf8.sub( this, pos, len );
|
|
return haxe.Utf8.sub( this, pos, len );
|
|
@@ -33,7 +33,7 @@ abstract UString(String) from String to String {
|
|
}
|
|
}
|
|
|
|
|
|
public inline function charAt( pos : Int ) : UString {
|
|
public inline function charAt( pos : Int ) : UString {
|
|
- #if (flash || js)
|
|
|
|
|
|
+ #if (flash || js || hl)
|
|
return this.charAt( pos );
|
|
return this.charAt( pos );
|
|
#else
|
|
#else
|
|
return haxe.Utf8.sub( this, pos, 1 );
|
|
return haxe.Utf8.sub( this, pos, 1 );
|