MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getChars

Method getChars

classpath/java/lang/StringBuilder.java:316–342  ·  view source on GitHub ↗
(int srcStart, int srcEnd, char[] dst, int dstStart)

Source from the content-addressed store, hash-verified

314 }
315
316 public void getChars(int srcStart, int srcEnd, char[] dst, int dstStart) {
317 if (srcStart < 0 || srcEnd > length) {
318 throw new IndexOutOfBoundsException();
319 }
320
321 flush();
322
323 int index = length;
324 for (Cell c = chain; c != null; c = c.next) {
325 int start = index - c.value.length();
326 int end = index;
327 index = start;
328
329 if (start < srcStart) {
330 start = srcStart;
331 }
332
333 if (end > srcEnd) {
334 end = srcEnd;
335 }
336
337 if (start < end) {
338 c.value.getChars(start - index, end - index,
339 dst, dstStart + (start - srcStart));
340 }
341 }
342 }
343
344 public String toString() {
345 char[] array = new char[length];

Callers 3

toStringMethod · 0.95
substringMethod · 0.95
appendMethod · 0.45

Calls 2

flushMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected