Home | History | Annotate | Download | only in test

Lines Matching refs:ch

30         int ch = s.charAt(i);
31 if (0xd800 <= ch && ch <= 0xdbff && ++i < s.length()) {
34 ch = (ch << 10) + ch2 - suppOffset;
37 return ch;
48 int ch = s.charAt(--i);
49 if (0xdc00 <= ch && ch <= 0xdfff && --i >= 0) {
52 ch = (ch2 << 10) + ch - suppOffset;
55 return ch;
66 int ch = s.charAt(i);
67 if (0xd800 <= ch && ch <= 0xdbff && ++i < s.length()) {
70 ch = (ch << 10) + ch2 - suppOffset;
73 return ch;
84 int ch = s.charAt(--i);
85 if (0xdc00 <= ch && ch <= 0xdfff && --i >= 0) {
88 ch = (ch2 << 10) + ch - suppOffset;
91 return ch;
108 * @param ch code point to append
110 public static final void appendCodePoint(StringBuffer buffer, int ch) {
111 if (ch <= 0xffff) {
112 buffer.append((char)ch);
114 buffer.append((char)(0xd7c0 + (ch >> 10)));
115 buffer.append((char)(0xdc00 + (ch & 0x3ff)));
124 * @param ch code point to be inserted
126 public static final void insertCodePoint(StringBuffer buffer, int i, int ch) {
127 if (ch <= 0xffff) {
128 buffer.insert(i, (char)ch);
130 buffer.insert(i, (char)(0xd7c0 + (ch >> 10))).insert(i + 1, (char)(0xdc00 + (ch & 0x3ff)));
139 * @param ch replacement code point
142 public static final int setCodePointAt(StringBuffer buffer, int i, int ch) {
145 if (ch <= 0xffff && cp <= 0xffff) { // Both BMP
146 buffer.setCharAt(i, (char)ch);
148 } else if (ch > 0xffff && cp > 0xffff) { // Both supplementary
149 buffer.setCharAt(i, (char)(0xd7c0 + (ch >> 10)));
150 buffer.setCharAt(i+1, (char)(0xdc00 + (ch & 0x3ff)));
152 } else if (ch <= 0xffff && cp > 0xffff) { // putting BMP instead of supplementary, buffer shrinks
153 buffer.setCharAt(i, (char)ch);
156 } else { //if (ch > 0xffff && cp <= 0xffff) { // putting supplementary instead of BMP, buffer grows
157 buffer.setCharAt(i, (char)(0xd7c0 + (ch >> 10)));
158 buffer.insert(i+1, (char)(0xdc00 + (ch & 0x3ff)));
172 char ch;
177 ch = source.charAt(i);
178 if (hadLeadSurrogate && 0xdc00 <= ch && ch <= 0xdfff) {
183 hadLeadSurrogate = (0xd800 <= ch && ch <= 0xdbff);
200 char ch;
205 ch = source.charAt(i);
206 if (hadLeadSurrogate && 0xdc00 <= ch && ch <= 0xdfff) {
211 hadLeadSurrogate = (0xd800 <= ch && ch <= 0xdbff);