public final class StringFormatter extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
insertEveryNthCharacter(String originalInput,
String separator,
int everyN)
Inserts a given
separator every nth character in the originalInput. |
public static String insertEveryNthCharacter(String originalInput, String separator, int everyN)
separator every nth character in the originalInput.
Returns originalInput unchanged when at least one of the passed strings is null/empty
or the everyN value is greater than the originalInput length.
Copyright © 2022. All rights reserved.