Package org.spockframework.util
Class TextUtil
java.lang.Object
org.spockframework.util.TextUtil
Utility methods for text processing.
- Author:
- Peter Niederwieser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcamelCaseToConstantCase(String value) static Stringcapitalize(String str) static StringchangeIndent(String line, int delta) static voidchangeIndent(List<String> lines, int delta) static intcountOccurrences(String text, char symbol) static Stringstatic Stringstatic Stringescape(char ch) static Stringescape(CharSequence seq) static intstatic intstatic intgetTrailingWhitespace(String line) Returns the number of whitespace characters at the end of the given line.static Stringstatic Stringstatic longlongHashCode(String string) static StringprintStackTrace(Throwable throwable) static StringrepeatChar(char ch, int times)
-
Constructor Details
-
TextUtil
public TextUtil()
-
-
Method Details
-
repeatChar
-
getIndent
-
getIndent
-
changeIndent
-
changeIndent
-
erase
-
erase
-
getTrailingWhitespace
Returns the number of whitespace characters at the end of the given line.- Parameters:
line-- Returns:
-
join
-
join
-
countOccurrences
-
escape
-
escape
-
printStackTrace
-
longHashCode
-
camelCaseToConstantCase
-
capitalize
-