2
0
Эх сурвалжийг харах

Merge pull request #5810 from HaxeFoundation/java-patch-charCodeAt

[java] fixes charCodeAt for surrogate characters, matches the c# behaviour
frabbit 8 жил өмнө
parent
commit
299e0bbd29

+ 1 - 1
std/java/internal/StringExt.hx

@@ -42,7 +42,7 @@ private typedef NativeString = String;
 			if ( index >= me.length() || index < 0 )
 			if ( index >= me.length() || index < 0 )
 				return null;
 				return null;
 			else
 			else
-				return me.codePointAt(index);
+				return (int) me.charAt(index);
 	')
 	')
 	public static function charCodeAt(me:NativeString, index:Int):Null<Int>
 	public static function charCodeAt(me:NativeString, index:Int):Null<Int>
 	{
 	{