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 String
camelCaseToConstantCase
(String value) static String
changeIndent
(String line, int delta) static void
changeIndent
(List<String> lines, int delta) static int
countOccurrences
(String text, char symbol) static String
static String
static String
escape
(char ch) static String
escape
(CharSequence seq) static int
static int
static int
getTrailingWhitespace
(String line) Returns the number of whitespace characters at the end of the given line.static String
static String
static long
longHashCode
(String string) static String
printStackTrace
(Throwable throwable) static String
repeatChar
(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
-