Package org.gradle.util
Class TextUtil
java.lang.Object
org.gradle.util.TextUtil
Deprecated.
Will be removed in Gradle 9.0.
This class is only here to maintain binary compatibility with existing plugins.
Plugins should prefer external frameworks over this class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
camelToKebabCase
(String camelCase) Deprecated.static boolean
containsWhitespace
(String str) Deprecated.Tells whether the specified string contains any whitespace characters.static String
convertLineSeparators
(String str, String sep) Deprecated.Converts all line separators in the specified string to the specified line separator.static String
Deprecated.Converts all line separators in the specified non-null string to the Unix line separator\n
.static String
escapeString
(Object obj) Deprecated.Escapes the toString() representation ofobj
for use in a literal string.static String
Deprecated.Returns the line separator for this platform.static String
Deprecated.Returns the line separator for Unix.static String
Deprecated.Returns the line separator for Windows.static String
Deprecated.Indents every line oftext
byindent
.static String
Deprecated.Same behavior as Groovy minus operator between Stringsstatic String
Deprecated.static String
Deprecated.Converts all native file separators in the specified string to '/'.static String
Deprecated.Converts all line separators in the specified nullable string to a single new line character (\n
).static String
replaceLineSeparatorsOf
(CharSequence string, String bySeparator) Deprecated.Converts all line separators in the specified non-nullCharSequence
to the specified line separator.static String
Deprecated.static String
Deprecated.This method should be used when making strings lowercase that could be affected by locale differences.static String
Deprecated.Converts all line separators in the specified string to the platform's line separator.
-
Constructor Details
-
TextUtil
public TextUtil()Deprecated.
-
-
Method Details
-
getWindowsLineSeparator
Deprecated.Returns the line separator for Windows. -
getUnixLineSeparator
Deprecated.Returns the line separator for Unix. -
getPlatformLineSeparator
Deprecated.Returns the line separator for this platform. -
convertLineSeparators
Deprecated.Converts all line separators in the specified string to the specified line separator. -
convertLineSeparatorsToUnix
Deprecated.Converts all line separators in the specified non-null string to the Unix line separator\n
. -
replaceLineSeparatorsOf
Deprecated.Converts all line separators in the specified non-nullCharSequence
to the specified line separator. -
toPlatformLineSeparators
Deprecated.Converts all line separators in the specified string to the platform's line separator. -
normaliseLineSeparators
Deprecated.Converts all line separators in the specified nullable string to a single new line character (\n
).- Returns:
- null if the given string is null
-
normaliseFileSeparators
Deprecated.Converts all native file separators in the specified string to '/'. -
escapeString
Deprecated.Escapes the toString() representation ofobj
for use in a literal string. This is useful for interpolating variables into script strings, as well as in other situations. -
containsWhitespace
Deprecated.Tells whether the specified string contains any whitespace characters. -
indent
Deprecated.Indents every line oftext
byindent
. Empty lines and lines that only contain whitespace are not indented. -
shorterOf
Deprecated. -
minus
Deprecated.Same behavior as Groovy minus operator between Strings- Parameters:
originalString
- original stringremoveString
- string to remove- Returns:
- string with removeString removed or the original string if it did not contain removeString
-
normaliseFileAndLineSeparators
Deprecated. -
camelToKebabCase
Deprecated. -
toLowerCaseLocaleSafe
Deprecated.This method should be used when making strings lowercase that could be affected by locale differences. This method always uses an English locale.- Parameters:
s
- string to be made lowercase- Returns:
- a lowercase string that ignores locale
- See Also:
-