void (final StringBuilder buffer, final String original, final int groupSize) { int pointer = 0; while (pointer + groupSize < original.length()) { buffer.append(original, pointer, pointer + groupSize); buffer.append('_'); pointer += groupSize; } if (pointer < original.length()) { buffer.append(original.substring(pointer)); } }