tech.deepdreams.worker.api.util.StringToolkit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-api Show documentation
Show all versions of worker-api Show documentation
Payroll Worker API project for Java 17
package tech.deepdreams.worker.api.util;
import java.util.HashMap;
import java.util.Map;
public class StringToolkit {
private static StringToolkit stringToolkit;
private StringToolkit(){
}
public static StringToolkit getInstance(){
if(stringToolkit == null)
stringToolkit = new StringToolkit();
return stringToolkit;
}
public String removeSpecialChars(String word){
Map map = new HashMap ();
String newWord = word ;
newWord = newWord.replaceAll("é", "e");
newWord = newWord.replaceAll("é".toUpperCase(), "e".toUpperCase());
newWord = newWord.replaceAll("à", "a");
newWord = newWord.replaceAll("à".toUpperCase(), "a".toUpperCase());
newWord = newWord.replaceAll("è", "e");
newWord = newWord.replaceAll("è".toUpperCase(), "e".toUpperCase());
newWord = newWord.replaceAll("'", " ");
newWord = newWord.replaceAll("’", " ");
newWord = newWord.replaceAll("-", " ");
newWord = newWord.replaceAll("\\.", "");
return newWord ;
}
}