public class TextUtil
extends java.lang.Object
| Constructor and Description |
|---|
TextUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsWhitespace(java.lang.String str)
Tells whether the specified string contains any whitespace characters.
|
static java.lang.String |
convertLineSeparators(java.lang.String str,
java.lang.String sep)
Converts all line separators in the specified string to the specified line separator.
|
static java.lang.String |
escapeString(java.lang.Object obj)
Escapes the toString() representation of
obj for use in a literal string. |
static java.lang.String |
getPlatformLineSeparator()
Returns the line separator for this platform.
|
static java.lang.String |
getUnixLineSeparator()
Returns the line separator for Unix.
|
static java.lang.String |
getWindowsLineSeparator()
Returns the line separator for Windows.
|
static java.lang.String |
toPlatformLineSeparators(java.lang.String str)
Converts all line separators in the specified string to the the platform's line separator.
|
public static java.lang.String getWindowsLineSeparator()
public static java.lang.String getUnixLineSeparator()
public static java.lang.String getPlatformLineSeparator()
public static java.lang.String convertLineSeparators(java.lang.String str,
java.lang.String sep)
public static java.lang.String toPlatformLineSeparators(java.lang.String str)
public static java.lang.String escapeString(java.lang.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(java.lang.String str)
Copyright © 2013. All rights reserved