The idea of this library is to fulfill only one gap - missing JDK String manipulations and checks. Yes, I could use
commons-lang3, but I got tired of neverending CVEs mainly caused by unrelated to String manipulations. So this
library starts small, mainly with operations which I used in the last 15 years of enterprise development (very few)
Warning
Under active development 🚧
- Null-safe operations – All methods handle
nullinputs gracefully without throwing exceptions. - Empty checks – Check whether a character sequence is empty or not.
- Blank checks – Determine if a string contains only whitespace characters.
- Capitalization – Convert the first character of a string to uppercase while preserving the rest.
Java 25
<dependencies>
<dependency>
<groupId>com.petromirdzhunev.libs</groupId>
<artifactId>strings</artifactId>
</dependency>
</dependencies>import com.petromirdzhunev.strings.Strings;
public class Example {
public static void main(String[] args) {
// Empty checks
Strings.isEmpty(null); // true
Strings.isEmpty(""); // true
Strings.isEmpty("hello"); // false
Strings.isNotEmpty("hello"); // true
// Blank checks
Strings.isBlank(null); // true
Strings.isBlank(""); // true
Strings.isBlank(" "); // true
Strings.isBlank("hello"); // false
// Capitalization
Strings.capitalize("hello"); // "Hello"
Strings.capitalize("Hello"); // "Hello"
Strings.capitalize(null); // null
Strings.capitalize("éhello"); // Éhello
}
}- Install SDKMAN
- Initialize SDKMAN environment
sdk env installCheck .sdkmanrc for all the tools installed with this command.
Change the version by adding a -SNAPSHOT suffix in the pom.xml file and then execute:
mvnd -B clean install<dependencies>
<dependency>
<groupId>com.petromirdzhunev.lib</groupId>
<artifactId>strings</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>