The Bytecode Club
FastStringUtils - Pure Java zero dependency String utils - Printable Version

+- The Bytecode Club (https://the.bytecode.club)
+-- Forum: Software (https://the.bytecode.club/forumdisplay.php?fid=19)
+--- Forum: Java Projects / Libraries (https://the.bytecode.club/forumdisplay.php?fid=136)
+--- Thread: FastStringUtils - Pure Java zero dependency String utils (/showthread.php?tid=46007)



FastStringUtils - Pure Java zero dependency String utils - Konloch - 02-17-2023

About: FastStringUtils is an easy-to-use zero dependency collection of very fast String utility functions for Java.
License: MIT License
Source: https://konloch.com/FastStringUtils/
Download Jar: https://konloch.com/FastStringUtils/releases/
Add as maven dependency:
Code:
<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>FastStringUtils</artifactId>
  <version>1.0.0</version>
</dependency>

Splitting a String with a supplied separator
Code:
//split the string using the space character as a separator
String[] simpleSplitExample = FastStringUtils.split("Split Example", " ");

//split the string using the space character as a separator, with a maximum search limit of 2
String[] limiterSplitExample = FastStringUtils.split("Split Example With A Limit ", " ", 2);

//split the string using the space character as a separator, with a maximum search limit of 2, and preserve the separator
String[] limiterSplitExamplePreseveSeparator = FastStringUtils.split("Split Example With A Limit ", " ", 2, true);