소스 검색

[java] fixes charCodeAt for surrogate characters, matches the c# behaviour

frabbit 9 년 전
부모
커밋
e2d4dab194
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/java/internal/StringExt.hx

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

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