Package Summary Overview Summary

### method:stripIndent() [CHANGED]
> ### stripIndent @Deprecated(forRemoval=true, since="13") public String stripIndent() Deprecated, for removal:This API element is subject to removal in a future version.Thismethod is associated with text blocks , a preview feature of the Java language feature. Text blocks and/or. Programs can only use this method when preview features are enabled. Preview features may be changed orremoved in a future release, or upgraded to permanent features of the Java language. Returns a string whose value is this string, with incidental white space removed from the beginning and end of every line. Incidental white space is often present in a text block to align the content with the opening delimiter. For example, in the following code, dots represent incidental white space :
>      String html = """
>      ..............<html>
>      ..............    <body>
>      ..............        <p>Hello, world</p>
>      ..............    </body>
>      ..............</html>
>      ..............""";
> This method treats the incidental white space as indentation to be stripped, producing a string that preserves the relative indentation of the content. Using | to visualize the start of each line of the string:
>      |<html>
>      |    <body>
>      |        <p>Hello, world</p>
>      |    </body>
>      |</html>
First, the individual lines of this string are extracted as if by using `lines()`. Then, the minimum indentation (min) is determined as follows. For each non-blank line (as defined by `isBlank()`), the leading white space characters are counted. The leading white space characters on the last line are also counted even if blank. The min value is the smallest of these counts. For each non-blank line, min leading white space characters are removed, and any trailing white space characters are removed. Blank lines are replaced with the empty string. Finally, the lines are joined into a new string, using the LF character `"\n"` (U+000A) to separate lines. API Note: This method's primary purpose is to shift a block of lines as far as possible to the left, while preserving relative indentation. Lines that were indented the least will thus have no leading white space . The line count of the result will be the same as line count of this string. If this string ends with a line terminator then the result will end with a line terminator. Implementation Note: This method treats all white space characters as having equal width. As long as the indentation on every line is consistently composed of the same character sequences, then the result will be as described above. Returns: string with incidental indentation removed and line terminators normalized Since: 13 See Also: `lines()`, `isBlank()`, `indent(int)`, `Character.isWhitespace(int)`
> ### stripIndent @Deprecated(forRemoval=true, since="13") public String stripIndent() Deprecated, for removal: This API element is subject to removal in a future version. This method is associated with text blocks, a preview language feature. Text blocks and/or this method may be changed or removed in a future release. Returns a string whose value is this string, with incidental white space removed from the beginning and end of every line. Incidental white space is often present in a text block to align the content with the opening delimiter. For example, in the following code, dots represent incidental white space :
>      String html = """
>      ..............<html>
>      ..............    <body>
>      ..............        <p>Hello, world</p>
>      ..............    </body>
>      ..............</html>
>      ..............""";
> This method treats the incidental white space as indentation to be stripped, producing a string that preserves the relative indentation of the content. Using | to visualize the start of each line of the string:
>      |<html>
>      |    <body>
>      |        <p>Hello, world</p>
>      |    </body>
>      |</html>
> First, the individual lines of this string are extracted as if by using `lines()`. Then, the minimum indentation (min) is determined as follows. For each non-blank line (as defined by `isBlank()`), the leading white space characters are counted. The leading white space characters on the last line are also counted even if blank. The min value is the smallest of these counts. For each non-blank line, min leading white space characters are removed, and any trailing white space characters are removed. Blank lines are replaced with the empty string. Finally, the lines are joined into a new string, using the LF character `"\n"` (U+000A) to separate lines. API Note: This method's primary purpose is to shift a block of lines as far as possible to the left, while preserving relative indentation. Lines that were indented the least will thus have no leading white space . The line count of the result will be the same as line count of this string. If this string ends with a line terminator then the result will end with a line terminator. Implementation Note: This method treats all white space characters as having equal width. As long as the indentation on every line is consistently composed of the same character sequences, then the result will be as described above. Returns: string with incidental indentation removed and line terminators normalized Since: 13 See Also: `lines()`, `isBlank()`, `indent(int)`, `Character.isWhitespace(int)` | ### stripIndent public String stripIndent() This method is associated with text blocks , a preview feature of the Java language. Programs can only use this method when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java language. Returns a string whose value is this string, with incidental white space removed from the beginning and end of every line. Incidental white space is often present in a text block to align the content with the opening delimiter. For example, in the following code, dots represent incidental white space :
>      String html = """
>      ..............<html>
>      ..............    <body>
>      ..............        <p>Hello, world</p>
>      ..............    </body>
>      ..............</html>
>      ..............""";
> This method treats the incidental white space as indentation to be stripped, producing a string that preserves the relative indentation of the content. Using | to visualize the start of each line of the string:
>      |<html>
>      |    <body>
>      |        <p>Hello, world</p>
>      |    </body>
>      |</html>
First, the individual lines of this string are extracted as if by using `lines()`. Then, the minimum indentation (min) is determined as follows. For each non-blank line (as defined by `isBlank()`), the leading white space characters are counted. The leading white space characters on the last line are also counted even if blank. The min value is the smallest of these counts. For each non-blank line, min leading white space characters are removed, and any trailing white space characters are removed. Blank lines are replaced with the empty string. Finally, the lines are joined into a new string, using the LF character `"\n"` (U+000A) to separate lines. API Note: This method's primary purpose is to shift a block of lines as far as possible to the left, while preserving relative indentation. Lines that were indented the least will thus have no leading white space . The line count of the result will be the same as line count of this string. If this string ends with a line terminator then the result will end with a line terminator. Implementation Note: This method treats all white space characters as having equal width. As long as the indentation on every line is consistently composed of the same character sequences, then the result will be as described above. Returns: string with incidental indentation removed and line terminators normalized Since: 13 See Also: `lines()`, `isBlank()`, `indent(int)`, `Character.isWhitespace(int)`

### method:translateEscapes() [CHANGED]
### translateEscapes @Deprecated(forRemoval=true, since="13") public String translateEscapes() Deprecated, for removal:This API element is subject to removal in a future version.Thismethod is associated with text blocks , a preview feature of the Java language feature. Text blocks and/or. Programs can only use this method when preview features are enabled. Preview features may be changed orremoved in a future release, or upgraded to permanent features of the Java language. Returns a string whose value is this string, with escape sequences translated as if in a string literal. Escape sequences are translated as follows;
Translation
Escape | Name | Translation
--- | --- | ---
`\b` | backspace | `U+0008`
`\t` | horizontal tab | `U+0009`
`\n` | line feed | `U+000A`
`\f` | form feed | `U+000C`
`\r` | carriage return | `U+000D`
`\"` | double quote | `U+0022`
`\'` | single quote | `U+0027`
`\\` | backslash | `U+005C`
`\0 - \377` | octal escape | code point equivalents
Implementation Note: This method does not translate Unicode escapes such as "`\u2022`". Unicode escapes are translated by the Java compiler when reading input characters and are not part of the string literal specification. Returns: String with escape sequences translated. Throws: `IllegalArgumentException` - when an escape sequence is malformed. See Java Language Specification : 3.10.7 Escape Sequences Since: 13
### translateEscapes @Deprecated(forRemoval=true, since="13") public String translateEscapes() Deprecated, for removal: This API element is subject to removal in a future version. This method is associated with text blocks, a preview language feature. Text blocks and/or this method may be changed or removed in a future release. Returns a string whose value is this string, with escape sequences translated as if in a string literal. Escape sequences are translated as follows;
Translation
Escape | Name | Translation
--- | --- | ---
`\b` | backspace | `U+0008`
`\t` | horizontal tab | `U+0009`
`\n` | line feed | `U+000A`
`\f` | form feed | `U+000C`
`\r` | carriage return | `U+000D`
`\"` | double quote | `U+0022`
`\'` | single quote | `U+0027`
`\\` | backslash | `U+005C`
`\0 - \377` | octal escape | code point equivalents
Implementation Note: This method does not translate Unicode escapes such as "`\u2022`". Unicode escapes are translated by the Java compiler when reading input characters and are not part of the string literal specification. Returns: String with escape sequences translated. Throws: `IllegalArgumentException` - when an escape sequence is malformed. See Java Language Specification : 3.10.7 Escape Sequences Since: 13 | ### translateEscapes public String translateEscapes() This method is associated with text blocks , a preview feature of the Java language. Programs can only use this method when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java language. Returns a string whose value is this string, with escape sequences translated as if in a string literal. Escape sequences are translated as follows;
Translation
Escape | Name | Translation
--- | --- | ---
`\b` | backspace | `U+0008`
`\t` | horizontal tab | `U+0009`
`\n` | line feed | `U+000A`
`\f` | form feed | `U+000C`
`\r` | carriage return | `U+000D`
`\"` | double quote | `U+0022`
`\'` | single quote | `U+0027`
`\\` | backslash | `U+005C`
`\0 - \377` | octal escape | code point equivalents
Implementation Note: This method does not translate Unicode escapes such as "`\u2022`". Unicode escapes are translated by the Java compiler when reading input characters and are not part of the string literal specification. Returns: String with escape sequences translated. Throws: `IllegalArgumentException` - when an escape sequence is malformed. See Java Language Specification : 3.10.7 Escape Sequences Since: 13

### method:formatted(java.lang.Object...) [CHANGED]
### formatted @Deprecated(forRemoval=true, since="13") public String formatted​(Object... args)Deprecated, for removal: This API element is subject to removal in a future version. This method is associated with text blocks , a preview feature of the Java language feature. Text blocks and/or. Programs can only use this method when preview features are enabled. Preview features may be changed orremoved in a future release, or upgraded to permanent features of the Java language. Formats using this string as the format string, and the supplied arguments. Implementation Requirements: This method is equivalent to `String.format(this, args)` . Parameters: `args` - Arguments referenced by the format specifiers in this string. Returns: A formatted string Since: 13 See Also: `format(String,Object...)`, `Formatter`
### formatted @Deprecated(forRemoval=true, since="13") public String formatted​(Object... args) Deprecated, for removal: This API element is subject to removal in a future version. This method is associated with text blocks, a preview language feature. Text blocks and/or this method may be changed or removed in a future release. Formats using this string as the format string, and the supplied arguments. Implementation Requirements: This method is equivalent to `String.format(this, args)` . Parameters: `args` - Arguments referenced by the format specifiers in this string. Returns: A formatted string Since: 13 See Also: `format(String,Object...)`, `Formatter` | ### formatted public String formatted​(Object... args) This method is associated with text blocks , a preview feature of the Java language. Programs can only use this method when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java language. Formats using this string as the format string, and the supplied arguments. Implementation Requirements: This method is equivalent to `String.format(this, args)` . Parameters: `args` - Arguments referenced by the format specifiers in this string. Returns: A formatted string Since: 13 See Also: `format(String,Object...)`, `Formatter`