Skip to content

nowshad-hasan/naughty-strings-java

Repository files navigation

Naughty-Strings Java

Java API for the Big List of Naughty Strings.

CHANGELOG is here.

Description

Sometimes we need to test our user input with different types of strings. It might be character, icon, emoji, SQL injection etc. This library is built to validate the user input with those totally uncertain strings. We call it Naughty Strings. Some example below:
Ω≈ç√∫˜µ≤≥÷
åß∂ƒ©˙∆˚¬…æ
œ∑´®†¥¨ˆøπ“‘
¡™£¢∞§¶•ªº–≠
¸˛Ç◊ı˜Â¯˘¿
👨‍🦰 👨🏿‍🦰 👨‍🦱 👨🏿‍🦱 🦹🏿‍♂
;alert(123);
社會科學院語學研究所
(。◕ ∀ ◕。)

Installation

Gradle:

implementation 'io.github.nowshad-hasan:naughty-strings-java:1.0.1'

Maven:

<dependency>
    <groupId>io.github.nowshad-hasan</groupId>
    <artifactId>naughty-strings-java</artifactId>
    <version>1.0.1</version>
</dependency>

Please go to Maven Repository for other dependencies.

Usage

We can use it in two ways.

  1. Get all the strings of a type
List<String> naughtyStringList = BLNS.getList(NaughtyStrings.RESERVED_STRINGS);

If we want all the naughty strings, then we must pass the enum NaughtyStrings.ALL.

  1. Get custom size, random strings of a type
List<String> randomNaughtyStringList = BLNS.getRandomList(10, NaughtyStrings.NUMERIC_STRINGS);

We have to pass NaughtyStrings.ALL to get the random custom size list from all the naughty strings.

Contribution

Please feel free to contribute in this project, by solving any critical issue, typo, code-structure improvement etc. Open an issue here with description, screenshot and anything you need.

Pull Requests are most welcome. Read the guide from opensource.com or GitHub docs and make a PR with your desired code. We will definitely look into it.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages