The Bytecode Club
Log inJoin the club
Java Projects / Libraries

FastStringUtils - Fast String Utilities (Split without regex)

Started by Konloch · Feb 17, 2023

0 replies24,164 views
Feb 17, 2023#1

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:

<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>FastStringUtils</artifactId>
  <version>1.0.0</version>
</dependency>

Splitting a String with a supplied separator

//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);
Got something to add?

Log in to post a reply.

Join the conversation