| 193 | } |
| 194 | |
| 195 | final void delete0(int start, int end) { |
| 196 | if (start >= 0) { |
| 197 | if (end > count) { |
| 198 | end = count; |
| 199 | } |
| 200 | if (end == start) { |
| 201 | return; |
| 202 | } |
| 203 | if (end > start) { |
| 204 | int length = count - end; |
| 205 | if (length >= 0) { |
| 206 | if (!shared) { |
| 207 | System.arraycopy(value, end, value, start, length); |
| 208 | } else { |
| 209 | char[] newData = new char[value.length]; |
| 210 | System.arraycopy(value, 0, newData, 0, start); |
| 211 | System.arraycopy(value, end, newData, start, length); |
| 212 | value = newData; |
| 213 | shared = false; |
| 214 | } |
| 215 | } |
| 216 | count -= end - start; |
| 217 | return; |
| 218 | } |
| 219 | } |
| 220 | throw new StringIndexOutOfBoundsException(); |
| 221 | } |
| 222 | |
| 223 | final void deleteCharAt0(int location) { |
| 224 | if (0 > location || location >= count) { |