TextUtil

open class TextUtil(source)

Deprecated

This class is only here to maintain binary compatibility with existing plugins.

Plugins should prefer external frameworks over this class.

Deprecated

Will be removed in Gradle 9.0.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun camelToKebabCase(camelCase: String): String
Link copied to clipboard
Tells whether the specified string contains any whitespace characters.
Link copied to clipboard
@Nullable
open fun convertLineSeparators(@Nullable str: String, sep: String): String
Converts all line separators in the specified string to the specified line separator.
Link copied to clipboard
Converts all line separators in the specified non-null string to the Unix line separator \n.
Link copied to clipboard
open fun escapeString(obj: Any): String
Escapes the toString() representation of obj for use in a literal string.
Link copied to clipboard
Returns the line separator for this platform.
Link copied to clipboard
Returns the line separator for Unix.
Link copied to clipboard
Returns the line separator for Windows.
Link copied to clipboard
open fun indent(text: String, indent: String): String
Indents every line of text by indent.
Link copied to clipboard
open fun minus(originalString: String, removeString: String): String
Same behavior as Groovy minus operator between Strings
Link copied to clipboard
Link copied to clipboard
Converts all native file separators in the specified string to '/'.
Link copied to clipboard
@Nullable
open fun normaliseLineSeparators(@Nullable str: String): String
Converts all line separators in the specified nullable string to a single new line character (\n).
Link copied to clipboard
open fun replaceLineSeparatorsOf(string: CharSequence, bySeparator: String): String
Converts all line separators in the specified non-null CharSequence to the specified line separator.
Link copied to clipboard
open fun shorterOf(s1: String, s2: String): String
Link copied to clipboard
This method should be used when making strings lowercase that could be affected by locale differences.
Link copied to clipboard
Converts all line separators in the specified string to the platform's line separator.