Class StringUtil
java.lang.Object
org.locationtech.jtstest.util.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String s) Capitalizes the given string.static booleanReturns true if substring is indeed a substring of string.static booleancontainsIgnoreCase(String string, String substring) Returns true if substring is indeed a substring of string.static Stringstatic StringescapeHTML(String s) static Stringformat(double d, int decimals) Returns d as a string truncated to the specified number of decimal placesstatic ListConverts the comma-delimited string into a List of trimmed strings.static StringReturns an throwable's stack tracestatic StringgetStackTrace(Throwable t, int depth) static StringgetTimeString(long milliseconds) Converts the milliseconds value into a String of the form "9d 22h 15m 8s".static Stringstatic intindexOfIgnoreParentheses(char c, String s, int start) Returns the position of the first occurrence of the given character found in s starting at start.static booleanReturns true if s can be converted to an int.static StringPads the String with the given character until it has the given length.static StringReplaces consecutive instances of characters with single instances.static StringremoveFromEnd(String s, String strToRemove) static StringRemoves vowels from the string.static StringRemoves vowels from the string except those that start words.static voidreplace(StringBuffer orig, String o, String n, boolean all) Replaces all instances of the String o with the String n in the StringBuffer orig if all is true, or only the first instance if all is false.static StringReturns a string with all occurrences of oldChar replaced by newStrstatic StringReturns original with occurrences of oldSubstring replaced by newSubstring.static StringreplaceAll(String original, String oldSubstring, String newSubstring) Returns original with all occurrences of oldSubstring replaced by newSubstringstatic StringreplaceFirst(String original, String oldSubstring, String newSubstring) Returns original with the first occurrenc of oldSubstring replaced by newSubstringstatic StringPads the String with the given character until it has the given length.static StringstringOfChar(char ch, int count) Returns a String of the given length consisting entirely of the given characterstatic StringstripHTMLTags(String original) Removes the HTML tags from the given String, inserting line breaks at appropriate places.static StringReturns the elements of c separated by commas. c must not be empty.static StringReturns the elements of c separated by commas and enclosed in single-quotesstatic VectortoLowerCase(List v) Returns the elements of v in lowercasestatic StringIf s is null, returns "null"; otherwise, returns s.static VectorReturns the elements of v in uppercasestatic StringLine-wraps a string s by inserting CR-LF instead of the first space after the nth columns.
-
Field Details
-
newLine
-
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
removeFromEnd
-
capitalize
-
isInteger
Returns true if s can be converted to an int. -
getStackTrace
-
getStackTrace
-
getTimeString
Converts the milliseconds value into a String of the form "9d 22h 15m 8s". -
containsIgnoreCase
-
contains
-
replace
-
stringOfChar
Returns a String of the given length consisting entirely of the given character -
indent
-
toUpperCase
-
toLowerCase
-
toCommaDelimitedStringInQuotes
Returns the elements of c separated by commas and enclosed in single-quotes -
toCommaDelimitedString
Returns the elements of c separated by commas. c must not be empty. -
fromCommaDelimitedString
-
toStringNeverNull
-
replace
Replaces all instances of the String o with the String n in the StringBuffer orig if all is true, or only the first instance if all is false. Posted by Steve Chapel invalid input: '<'schapel@breakthr.com> on UseNet -
replaceAll
-
replaceFirst
-
leftPad
-
rightPad
-
stripHTMLTags
-
format
Returns d as a string truncated to the specified number of decimal places -
wrap
-
removeVowels
-
removeVowelsSkipStarts
-
removeConsecutiveDuplicates
-
indexOfIgnoreParentheses
Returns the position of the first occurrence of the given character found in s starting at start. Ignores text within pairs of parentheses. Returns -1 if no occurrence is found. -
replace
-
escapeHTML
-
currentMethodName
-