Class StringUtil
java.lang.Object
com.seibel.distanthorizons.coreapi.util.StringUtil
Miscellaneous string helper functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbyteArrayToHexString(byte[] bytes) Converts the given byte array into a hex string representation.static <T> StringCombines each item in the given list together separated by the given delimiter.static <T> Stringstatic intnthIndexOf(String str, String substr, int n) Returns the n-th index of the given string.
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
nthIndexOf
Returns the n-th index of the given string.
Original source: https://stackoverflow.com/questions/3976616/how-to-find-nth-occurrence-of-character-in-a-string -
join
- See Also:
-
join
Combines each item in the given list together separated by the given delimiter. -
byteArrayToHexString
Converts the given byte array into a hex string representation.
source: https://stackoverflow.com/a/9855338
-