public class WhiteUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static @NotNull String |
delete(CharSequence str)
把所有白字符删除
|
static boolean |
equalsWithDeleted(CharSequence str1,
CharSequence str2) |
static boolean |
equalsWithSpaced(CharSequence str1,
CharSequence str2) |
static boolean |
isAllWhite(CharSequence str)
是否全部为空白字符
|
static boolean |
isWhiteSpace(char c) |
static @NotNull List<String> |
lines(CharSequence str) |
static boolean |
notWhiteSpace(char c) |
static @NotNull String |
space(CharSequence str)
把中间所有白字符(连续的视为一个)替换成一个空格(0x20),并去掉头和尾的空格
|
static @NotNull String |
trim(CharSequence str)
把头部和尾部的白字符,全部删除
|
public static boolean notWhiteSpace(char c)
public static boolean isWhiteSpace(char c)
@NotNull public static @NotNull String trim(CharSequence str)
str - 输入@NotNull public static @NotNull String space(CharSequence str)
str - 输入@NotNull public static @NotNull String delete(CharSequence str)
str - 输入public static boolean isAllWhite(CharSequence str)
str - 输入public static boolean equalsWithDeleted(CharSequence str1, CharSequence str2)
public static boolean equalsWithSpaced(CharSequence str1, CharSequence str2)
@NotNull public static @NotNull List<String> lines(CharSequence str)
Copyright © 2020. All rights reserved.