public class TextUtil extends Object
| Constructor and Description |
|---|
TextUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsWhitespace(String str)
Tells whether the specified string contains any whitespace characters.
|
static String |
convertLineSeparators(String str,
String sep)
Converts all line separators in the specified string to the specified line separator.
|
static String |
escapeString(Object obj)
Escapes the toString() representation of
obj for use in a literal string. |
static String |
getPlatformLineSeparator()
Returns the line separator for this platform.
|
static String |
getUnixLineSeparator()
Returns the line separator for Unix.
|
static String |
getWindowsLineSeparator()
Returns the line separator for Windows.
|
static String |
toPlatformLineSeparators(String str)
Converts all line separators in the specified string to the the platform's line separator.
|
public static String getWindowsLineSeparator()
public static String getUnixLineSeparator()
public static String getPlatformLineSeparator()
public static String convertLineSeparators(String str, String sep)
public static String toPlatformLineSeparators(String str)
public static String escapeString(Object obj)
Escapes the toString() representation of obj for use in a literal string.
This is useful for interpolating variables into script strings, as well as in other situations.
public static boolean containsWhitespace(String str)
Copyright © 2013. All rights reserved