Slide 21
Slide 21 text
@dwursteisen
#DevoxxFR #CodeReview
private static final TO_BE_REPLACED = new char[] { '_', ','; '-'};
public static String normalize(final String string) {
if (string == null) {
return null;
}
String normalizedString = string;
for (char charToReplace : TO_BE_REPLACED) {
normalizedString = normalizedString.replace(charToReplace, ' ');
}
return normalizedString.trim();
}