mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
4993841: (str) java.lang.Character should have a toString(int) method
Reviewed-by: martin, rriggs, sherman, smarks
This commit is contained in:
parent
a131e1668f
commit
3d4edcc571
4 changed files with 91 additions and 3 deletions
|
@ -235,6 +235,13 @@ final class StringUTF16 {
|
|||
return result;
|
||||
}
|
||||
|
||||
static byte[] toBytesSupplementary(int cp) {
|
||||
byte[] result = new byte[4];
|
||||
putChar(result, 0, Character.highSurrogate(cp));
|
||||
putChar(result, 1, Character.lowSurrogate(cp));
|
||||
return result;
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
|
||||
// We need a range check here because 'getChar' has no checks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue