Package org.gradle.util
Klasse TextUtil
java.lang.Object
org.gradle.util.TextUtil
Veraltet.
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.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic StringcamelToKebabCase(String camelCase) Veraltet.static booleancontainsWhitespace(String str) Veraltet.Tells whether the specified string contains any whitespace characters.static StringconvertLineSeparators(String str, String sep) Veraltet.Converts all line separators in the specified string to the specified line separator.static StringVeraltet.Converts all line separators in the specified non-null string to the Unix line separator\n.static StringescapeString(Object obj) Veraltet.Escapes the toString() representation ofobjfor use in a literal string.static StringVeraltet.Returns the line separator for this platform.static StringVeraltet.Returns the line separator for Unix.static StringVeraltet.Returns the line separator for Windows.static StringVeraltet.Indents every line oftextbyindent.static StringVeraltet.Same behavior as Groovy minus operator between Stringsstatic StringVeraltet.static StringVeraltet.Converts all native file separators in the specified string to '/'.static StringVeraltet.Converts all line separators in the specified nullable string to a single new line character (\n).static StringreplaceLineSeparatorsOf(CharSequence string, String bySeparator) Veraltet.Converts all line separators in the specified non-nullCharSequenceto the specified line separator.static StringVeraltet.static StringVeraltet.This method should be used when making strings lowercase that could be affected by locale differences.static StringVeraltet.Converts all line separators in the specified string to the platform's line separator.
-
Konstruktordetails
-
TextUtil
public TextUtil()Veraltet.
-
-
Methodendetails
-
getWindowsLineSeparator
Veraltet.Returns the line separator for Windows. -
getUnixLineSeparator
Veraltet.Returns the line separator for Unix. -
getPlatformLineSeparator
Veraltet.Returns the line separator for this platform. -
convertLineSeparators
Veraltet.Converts all line separators in the specified string to the specified line separator. -
convertLineSeparatorsToUnix
Veraltet.Converts all line separators in the specified non-null string to the Unix line separator\n. -
replaceLineSeparatorsOf
Veraltet.Converts all line separators in the specified non-nullCharSequenceto the specified line separator. -
toPlatformLineSeparators
Veraltet.Converts all line separators in the specified string to the platform's line separator. -
normaliseLineSeparators
Veraltet.Converts all line separators in the specified nullable string to a single new line character (\n).- Gibt zurück:
- null if the given string is null
-
normaliseFileSeparators
Veraltet.Converts all native file separators in the specified string to '/'. -
escapeString
Veraltet.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
Veraltet.Tells whether the specified string contains any whitespace characters. -
indent
Veraltet.Indents every line oftextbyindent. Empty lines and lines that only contain whitespace are not indented. -
shorterOf
Veraltet. -
minus
Veraltet.Same behavior as Groovy minus operator between Strings- Parameter:
originalString- original stringremoveString- string to remove- Gibt zurück:
- string with removeString removed or the original string if it did not contain removeString
-
normaliseFileAndLineSeparators
Veraltet. -
camelToKebabCase
Veraltet. -
toLowerCaseLocaleSafe
Veraltet.This method should be used when making strings lowercase that could be affected by locale differences. This method always uses an English locale.- Parameter:
s- string to be made lowercase- Gibt zurück:
- a lowercase string that ignores locale
- Siehe auch:
-