Class StringUtils
java.lang.Object
org.variantsync.diffdetective.util.StringUtils
A collection of useful utilities related to string processing.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static void
clear
(StringBuilder builder) Remove the contentbuilder
so it can be reused for a new string.private static void
prettyPrintNestedCollections
(String indent, StringBuilder b, Collection<?> os) Append a human readable string representation ofcollection
tob
.static String
prettyPrintNestedCollections
(Collection<?> collection) Returns a human readable string representation ofcollection
.
-
Field Details
-
LINEBREAK
An operating system independent line break used in almost all internal strings.- See Also:
-
LINEBREAK_REGEX
A regex to identify line breaks of any operating system .
-
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
clear
Remove the contentbuilder
so it can be reused for a new string. -
prettyPrintNestedCollections
Append a human readable string representation ofcollection
tob
.- Parameters:
indent
- an indent prepended to all appended linesb
- a string builder on which result is appendedos
- the collection to be pretty printed
-
prettyPrintNestedCollections
Returns a human readable string representation ofcollection
. -
clamp
-