Package org.gradle.util

## Class TextUtil

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

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

      Deprecated.
      Returns the line separator for Windows.

    - #### getUnixLineSeparator

          public static String getUnixLineSeparator()

      Deprecated.
      Returns the line separator for Unix.

    - #### getPlatformLineSeparator

          public static String getPlatformLineSeparator()

      Deprecated.
      Returns the line separator for this platform.

    - #### convertLineSeparators

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

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

    - #### convertLineSeparatorsToUnix

          public static String convertLineSeparatorsToUnix​(String str)

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

    - #### replaceLineSeparatorsOf

          public static String replaceLineSeparatorsOf​(CharSequence string,
                                                       String bySeparator)

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

    - #### toPlatformLineSeparators

          public static String toPlatformLineSeparators​(String str)

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

    - #### normaliseLineSeparators

          @Nullable
          public static String normaliseLineSeparators​(@Nullable
                                                       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 String normaliseFileSeparators​(String path)

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

    - #### escapeString

          public static String escapeString​(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​(String str)

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

    - #### indent

          public static String indent​(String text,
                                      String indent)

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

    - #### shorterOf

          public static String shorterOf​(String s1,
                                         String s2)

      Deprecated.

    - #### minus

          public static String minus​(String originalString,
                                     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 String normaliseFileAndLineSeparators​(String in)

      Deprecated.

    - #### camelToKebabCase

          public static String camelToKebabCase​(String camelCase)

      Deprecated.

    - #### toLowerCaseLocaleSafe

          public static String toLowerCaseLocaleSafe​(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