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 SummaryConstructors
- 
Method SummaryModifier 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- 
TextUtilpublic TextUtil()Deprecated.
 
- 
- 
Method Details- 
getWindowsLineSeparatorDeprecated.Returns the line separator for Windows.
- 
getUnixLineSeparatorDeprecated.Returns the line separator for Unix.
- 
getPlatformLineSeparatorDeprecated.Returns the line separator for this platform.
- 
convertLineSeparatorsDeprecated.Converts all line separators in the specified string to the specified line separator.
- 
convertLineSeparatorsToUnixDeprecated.Converts all line separators in the specified non-null string to the Unix line separator\n.
- 
replaceLineSeparatorsOfDeprecated.Converts all line separators in the specified non-nullCharSequenceto the specified line separator.
- 
toPlatformLineSeparatorsDeprecated.Converts all line separators in the specified string to the platform's line separator.
- 
normaliseLineSeparatorsDeprecated.Converts all line separators in the specified nullable string to a single new line character (\n).- Returns:
- null if the given string is null
 
- 
normaliseFileSeparatorsDeprecated.Converts all native file separators in the specified string to '/'.
- 
escapeStringDeprecated.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.
- 
containsWhitespaceDeprecated.Tells whether the specified string contains any whitespace characters.
- 
indentDeprecated.Indents every line oftextbyindent. Empty lines and lines that only contain whitespace are not indented.
- 
shorterOfDeprecated.
- 
minusDeprecated.Same behavior as Groovy minus operator between Strings- Parameters:
- originalString- original string
- removeString- string to remove
- Returns:
- string with removeString removed or the original string if it did not contain removeString
 
- 
normaliseFileAndLineSeparatorsDeprecated.
- 
camelToKebabCaseDeprecated.
- 
toLowerCaseLocaleSafeDeprecated.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:
 
 
-