Java 11 Development Features Part 1 - String strip() method
Development Java 11 Features
1. New String Methods
isBlank, lines, strip, stripLeading, stripTrailing, and repeat
2. New File Methods
3. Collection to an Array
4. The Not Predicate Method
5. Local-Variable Syntax for Lambda
6. HTTP Client
7. Nest Based Access Control
8. Running Java Files
Returns a string whose value is this string, with all leading and trailing white space removed.
If this String object represents an empty string, or if all code points in this string are white space, then an empty string is returned.
Otherwise, returns a substring of this string beginning with the first code point that is not a white space up to and including the last code point that is not a white space.
This method may be used to strip white space from the beginning and end of a string.
Returns:
a string whose value is this string, with all leading and trailing white space removed
Since:
11
See Also:
Character.isWhitespace(int)
public String strip() {
String ret = isLatin1() ? StringLatin1.strip(value)
: StringUTF16.strip(value);
return ret == null ? this : ret;
}
Смотрите видео Java 11 Development Features Part 1 - String strip() method онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал CodeWis Technologies by Nuhman Paramban 09 Декабрь 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 47 раз и оно понравилось 0 посетителям.