Ver Fonte

hl fixes

Nicolas Cannasse há 8 anos atrás
pai
commit
77bac93b35
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      hxd/UString.hx

+ 5 - 5
hxd/UString.hx

@@ -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 );