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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcamelToKebabCase(String camelCase) Deprecated.static booleancontainsWhitespace(String str) Deprecated.Tells whether the specified string contains any whitespace characters.static StringconvertLineSeparators(String str, String sep) Deprecated.Converts all line separators in the specified string to the specified line separator.static StringDeprecated.Converts all line separators in the specified non-null string to the Unix line separator\n.static StringescapeString(Object obj) Deprecated.Escapes the toString() representation ofobjfor use in a literal string.static StringDeprecated.Returns the line separator for this platform.static StringDeprecated.Returns the line separator for Unix.static StringDeprecated.Returns the line separator for Windows.static StringDeprecated.Indents every line oftextbyindent.static StringDeprecated.Same behavior as Groovy minus operator between Stringsstatic StringDeprecated.static StringDeprecated.Converts all native file separators in the specified string to '/'.static StringDeprecated.Converts all line separators in the specified nullable string to a single new line character (\n).static StringreplaceLineSeparatorsOf(CharSequence string, String bySeparator) Deprecated.Converts all line separators in the specified non-nullCharSequenceto the specified line separator.static StringDeprecated.static StringDeprecated.This method should be used when making strings lowercase that could be affected by locale differences.static StringDeprecated.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-nullCharSequenceto 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 ofobjfor 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 oftextbyindent. 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:
-