A small library which will convert censored words to * so that we can process string on frontend side : )
Add jitpack to your maven sources
allprojects { repositories { ... maven { url "https://jitpack.io" } } }
Add Censory as a dependency to your build.gradle
dependencies {
implementation 'com.github.KapilYadav-dev:Censory:1.0.4'
}
- Use with default list
- Use with custom list
String string ="Your string";
Censory censory = new Censory();
String output=censory.defaultCensor(string,context);
String string ="Your string";
List words =Arrays.asList("head", "now");
Censory censory = new Censory();
String output=censory.customCensor(string,words);