Package io.github.astrapi69.string
Class SplitStringExtensions
- java.lang.Object
-
- io.github.astrapi69.string.SplitStringExtensions
-
public final class SplitStringExtensions extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,java.lang.String>getTripleFromMessage(java.lang.String message)Splits the given message string into three parts and put them into aTripleobjectstatic java.util.Map<java.lang.String,java.lang.Integer>splitToWordsAndCount(java.lang.String input)Splits the given input string into words and puts them to a counter mapstatic java.util.Map<java.lang.String,java.lang.Integer>splitToWordsAndCount(java.lang.String input, java.lang.String regex)Splits the given input string into words and puts them to a counter mapstatic java.util.Map<java.lang.String,java.lang.Integer>splitToWordsAndCount(java.lang.String input, java.lang.String[] findString)Splits the given input string into words and puts them to a counter map
-
-
-
Method Detail
-
splitToWordsAndCount
public static java.util.Map<java.lang.String,java.lang.Integer> splitToWordsAndCount(java.lang.String input)
Splits the given input string into words and puts them to a counter map- Parameters:
input- The input string- Returns:
- The map with the words and the count
-
splitToWordsAndCount
public static java.util.Map<java.lang.String,java.lang.Integer> splitToWordsAndCount(java.lang.String input, java.lang.String[] findString)Splits the given input string into words and puts them to a counter map- Parameters:
input- The input stringfindString- An array with search patterns.- Returns:
- The map with the words and the count
-
splitToWordsAndCount
public static java.util.Map<java.lang.String,java.lang.Integer> splitToWordsAndCount(java.lang.String input, java.lang.String regex)Splits the given input string into words and puts them to a counter map- Parameters:
input- The input stringregex- The regex string that is used for splitting- Returns:
- The map with the words and the count
-
getTripleFromMessage
public static org.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,java.lang.String> getTripleFromMessage(java.lang.String message)
Splits the given message string into three parts and put them into aTripleobject- Parameters:
message- The message string- Returns:
- The splitted message in a
Tripleobject
-
-