TextUtil (Gradle API 7.6.3)

Package org.gradle.util

## Class TextUtil

- java.lang.Object
- - org.gradle.util.TextUtil

-     @Deprecated
      public class TextUtil
      extends java.lang.Object

  Deprecated.
  Will be removed in Gradle 8.0.
  This class is only here to maintain binary compatibility with existing plugins.

  Plugins should prefer external frameworks over this class.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TextUtil()` | Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.String` | `camelToKebabCase​(java.lang.String camelCase)` | Deprecated.
    `static boolean` | `containsWhitespace​(java.lang.String str)` | Deprecated. Tells whether the specified string contains any whitespace characters.
    `static java.lang.String` | `convertLineSeparators​(java.lang.String str, java.lang.String sep)` | Deprecated. Converts all line separators in the specified string to the specified line separator.
    `static java.lang.String` | `convertLineSeparatorsToUnix​(java.lang.String str)` | Deprecated. Converts all line separators in the specified non-null string to the Unix line separator `\n`.
    `static java.lang.String` | `escapeString​(java.lang.Object obj)` | Deprecated. Escapes the toString() representation of `obj` for use in a literal string.
    `static java.lang.String` | `getPlatformLineSeparator()` | Deprecated. Returns the line separator for this platform.
    `static java.lang.String` | `getUnixLineSeparator()` | Deprecated. Returns the line separator for Unix.
    `static java.lang.String` | `getWindowsLineSeparator()` | Deprecated. Returns the line separator for Windows.
    `static java.lang.String` | `indent​(java.lang.String text, java.lang.String indent)` | Deprecated. Indents every line of `text` by `indent`.
    `static java.lang.String` | `minus​(java.lang.String originalString, java.lang.String removeString)` | Deprecated. Same behavior as Groovy minus operator between Strings
    `static java.lang.String` | `normaliseFileAndLineSeparators​(java.lang.String in)` | Deprecated.
    `static java.lang.String` | `normaliseFileSeparators​(java.lang.String path)` | Deprecated. Converts all native file separators in the specified string to '/'.
    `static java.lang.String` | `normaliseLineSeparators​(java.lang.String str)` | Deprecated. Converts all line separators in the specified nullable string to a single new line character (`\n`).
    `static java.lang.String` | `replaceLineSeparatorsOf​(java.lang.CharSequence string, java.lang.String bySeparator)` | Deprecated. Converts all line separators in the specified non-null `CharSequence` to the specified line separator.
    `static java.lang.String` | `shorterOf​(java.lang.String s1, java.lang.String s2)` | Deprecated.
    `static java.lang.String` | `toLowerCaseLocaleSafe​(java.lang.String s)` | Deprecated. This method should be used when making strings lowercase that could be affected by locale differences.
    `static java.lang.String` | `toPlatformLineSeparators​(java.lang.String str)` | Deprecated. Converts all line separators in the specified string to the platform's line separator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextUtil

          public TextUtil()

      Deprecated.

  - ### Method Detail

    - #### getWindowsLineSeparator

          public static java.lang.String getWindowsLineSeparator()

      Deprecated.
      Returns the line separator for Windows.

    - #### getUnixLineSeparator

          public static java.lang.String getUnixLineSeparator()

      Deprecated.
      Returns the line separator for Unix.

    - #### getPlatformLineSeparator

          public static java.lang.String getPlatformLineSeparator()

      Deprecated.
      Returns the line separator for this platform.

    - #### convertLineSeparators

          @Nullable
          public static java.lang.String convertLineSeparators​(@Nullable
                                                               java.lang.String str,
                                                               java.lang.String sep)

      Deprecated.
      Converts all line separators in the specified string to the specified line separator.

    - #### convertLineSeparatorsToUnix

          public static java.lang.String convertLineSeparatorsToUnix​(java.lang.String str)

      Deprecated.
      Converts all line separators in the specified non-null string to the Unix line separator `\n`.

    - #### replaceLineSeparatorsOf

          public static java.lang.String replaceLineSeparatorsOf​(java.lang.CharSequence string,
                                                                 java.lang.String bySeparator)

      Deprecated.
      Converts all line separators in the specified non-null `CharSequence` to the specified line separator.

    - #### toPlatformLineSeparators

          public static java.lang.String toPlatformLineSeparators​(java.lang.String str)

      Deprecated.
      Converts all line separators in the specified string to the platform's line separator.

    - #### normaliseLineSeparators

          @Nullable
          public static java.lang.String normaliseLineSeparators​(@Nullable
                                                                 java.lang.String str)

      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

          public static java.lang.String normaliseFileSeparators​(java.lang.String path)

      Deprecated.
      Converts all native file separators in the specified string to '/'.

    - #### escapeString

          public static java.lang.String escapeString​(java.lang.Object obj)

      Deprecated.
      Escapes the toString() representation of `obj` for use in a literal string. This is useful for interpolating variables into script strings, as well as in other situations.

    - #### containsWhitespace

          public static boolean containsWhitespace​(java.lang.String str)

      Deprecated.
      Tells whether the specified string contains any whitespace characters.

    - #### indent

          public static java.lang.String indent​(java.lang.String text,
                                                java.lang.String indent)

      Deprecated.
      Indents every line of `text` by `indent`. Empty lines and lines that only contain whitespace are not indented.

    - #### shorterOf

          public static java.lang.String shorterOf​(java.lang.String s1,
                                                   java.lang.String s2)

      Deprecated.

    - #### minus

          public static java.lang.String minus​(java.lang.String originalString,
                                               java.lang.String removeString)

      Deprecated.
      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

    - #### normaliseFileAndLineSeparators

          public static java.lang.String normaliseFileAndLineSeparators​(java.lang.String in)

      Deprecated.

    - #### camelToKebabCase

          public static java.lang.String camelToKebabCase​(java.lang.String camelCase)

      Deprecated.

    - #### toLowerCaseLocaleSafe

          public static java.lang.String toLowerCaseLocaleSafe​(java.lang.String s)

      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:
        GRADLE-3470, Turkish i problem