@Test public void toLowerCaseNoReallocation() { final MutableCharArray source = new MutableCharArray("ŁÓdŹ"); final MutableCharArray result = new MutableCharArray(" z"); Assertions.assertThat(MutableCharArrayUtils.toLowerCase(source, result)).isTrue(); Assertions.assertThat(result.getBuffer()).isEqualTo("łódźz".toCharArray()); }
public static boolean toLowerCase(MutableCharArray source, MutableCharArray result) { char[] buffer = result.getBuffer(); final int length = source.length(); if (buffer.length < length) { buffer = new char[length]; } final boolean changed = CharArrayUtils.toLowerCase(source.getBuffer(), buffer, source.getStart(), source.length()); result.reset(buffer, 0, length); return changed; }
MutableCharArrayUtils { public static boolean toLowerCase(MutableCharArray source, MutableCharArray result) { char[] buffer = result.getBuffer(); final int length = source.length(); if (buffer.length < length) { buffer = new char[length]; } final boolean changed = CharArrayUtils.toLowerCase(source.getBuffer(), buffer, source.getStart(), source.length()); result.reset(buffer, 0, length); return changed; } }
MutableCharArrayUtils { public static boolean toLowerCase(MutableCharArray source, MutableCharArray result) { char[] buffer = result.getBuffer(); final int length = source.length(); if (buffer.length < length) { buffer = new char[length]; } final boolean changed = CharArrayUtils.toLowerCase(source.getBuffer(), buffer, source.getStart(), source.length()); result.reset(buffer, 0, length); return changed; }  }
MutableCharArrayUtils { public static boolean toLowerCase(MutableCharArray source, MutableCharArray result) { char[] buffer = result.getBuffer(); final int length = source.length(); if (buffer.length < length) { buffer = new char[length]; } final boolean changed = CharArrayUtils.toLowerCase(source.getBuffer(), buffer, source.getStart(), source.length()); result.reset(buffer, 0, length); return changed; }  static boolean toLowerCase(MutableCharArray source, MutableCharArray result); }
MutableCharArrayUtils { public static boolean toLowerCase(MutableCharArray source, MutableCharArray result) { char[] buffer = result.getBuffer(); final int length = source.length(); if (buffer.length < length) { buffer = new char[length]; } final boolean changed = CharArrayUtils.toLowerCase(source.getBuffer(), buffer, source.getStart(), source.length()); result.reset(buffer, 0, length); return changed; }  static boolean toLowerCase(MutableCharArray source, MutableCharArray result);  }