org.spockframework.util
Class TextUtil
java.lang.Object
org.spockframework.util.TextUtil
public abstract class TextUtil
- extends Object
Utility methods for text processing.
- Author:
- Peter Niederwieser
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextUtil
public TextUtil()
repeatChar
public static String repeatChar(char ch,
int times)
getIndent
public static int getIndent(String line)
getIndent
public static int getIndent(List<String> lines)
changeIndent
public static String changeIndent(String line,
int delta)
changeIndent
public static void changeIndent(List<String> lines,
int delta)
erase
public static String erase(String line,
int from,
int to)
erase
public static String erase(String line,
int from)
getTrailingWhitespace
public static int getTrailingWhitespace(String line)
- Returns the number of whitespace characters at the end of the given line.
- Parameters:
line
-
- Returns:
join
public static String join(List<?> objects,
String separator)
countOccurrences
public static int countOccurrences(String text,
char symbol)
Copyright © 2010. All Rights Reserved.