public class WhiteUtil extends Object
| Constructor and Description |
|---|
WhiteUtil() |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull String |
delete(CharSequence str)
Delete all white chars
|
static boolean |
equalsWithDeleted(CharSequence str1,
CharSequence str2) |
static boolean |
equalsWithSpaced(CharSequence str1,
CharSequence str2) |
static byte |
firstNonWhite(byte[] bs)
find first non-white byte, return 0x00 if not found
|
static char |
firstNonWhite(char[] cs)
find first non-white char, return 0x00 if not found
|
static char |
firstNonWhite(CharSequence cs)
find first non-white char, return 0x00 if not found
|
static boolean |
isAllWhite(CharSequence str)
Whether all white chars
|
static boolean |
isWhite(byte b)
whether is BOM, 0x20, \t, \r, \n
* UTF-8 BOM: EF BB BF
* UTF-16 BE BOM: FE FF
* UTF-16 LE BOM: FF FE
* UTF-32 BE BOM: 00 00 FE FF
* UTF-32 LE BOM: FF FE 00 00
|
static boolean |
isWhiteSpace(char c) |
static byte |
lastNonWhite(byte[] bs)
find last non-white byte, return 0x00 if not found
|
static char |
lastNonWhite(char[] cs)
find last non-white char, return 0x00 if not found
|
static char |
lastNonWhite(CharSequence cs)
find last non-white char, return 0x00 if not found
|
static @NotNull List<String> |
lines(CharSequence str) |
static boolean |
notWhiteSpace(char c) |
static @NotNull String |
space(CharSequence str)
Remove all white chars from the header and footer.
|
static @NotNull String |
trim(CharSequence str)
Remove all white chars from the header and footer.
|
static @NotNull String |
trim(CharSequence str,
char... cs) |
public static boolean isWhite(byte b)
whether is BOM, 0x20, \t, \r, \n * UTF-8 BOM: EF BB BF * UTF-16 BE BOM: FE FF * UTF-16 LE BOM: FF FE * UTF-32 BE BOM: 00 00 FE FF * UTF-32 LE BOM: FF FE 00 00
public static byte firstNonWhite(byte[] bs)
public static byte lastNonWhite(byte[] bs)
public static char firstNonWhite(char[] cs)
public static char lastNonWhite(char[] cs)
public static char firstNonWhite(CharSequence cs)
public static char lastNonWhite(CharSequence cs)
public static boolean notWhiteSpace(char c)
public static boolean isWhiteSpace(char c)
@NotNull public static @NotNull String trim(CharSequence str)
@NotNull public static @NotNull String trim(CharSequence str, char... cs)
@NotNull public static @NotNull String space(CharSequence str)
@NotNull public static @NotNull String delete(CharSequence str)
public static boolean isAllWhite(CharSequence 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 © 2024. All rights reserved.