public class FullCharUtil extends Object
| Constructor and Description |
|---|
FullCharUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countHalf(@Nullable CharSequence str) |
static @NotNull String |
leftCut(@Nullable CharSequence str,
int count)
From the left side, cut N width characters as new string (ascii counts as 1, non-ascii counts as 2).
|
static @NotNull String |
leftCut(@Nullable CharSequence str,
int count,
int off)
From the offset on the left side, cut N width characters as new string (ascii counts as 1, non-ascii counts as 2).
|
static @NotNull String |
rightCut(@Nullable CharSequence str,
int count)
From the right side, cut N width characters as new string (ascii counts as 1, non-ascii counts as 2).
|
static @NotNull String |
rightCut(@Nullable CharSequence str,
int count,
int off)
From the offset on the right side, cut N width characters as new string (ascii counts as 1, non-ascii counts as 2).
|
@NotNull public static @NotNull String leftCut(@Nullable @Nullable CharSequence str, int count)
leftCut(CharSequence, int, int)@NotNull public static @NotNull String leftCut(@Nullable @Nullable CharSequence str, int count, int off)
str - the stringcount - count of widthoff - offset on the left@NotNull public static @NotNull String rightCut(@Nullable @Nullable CharSequence str, int count)
@NotNull public static @NotNull String rightCut(@Nullable @Nullable CharSequence str, int count, int off)
str - the stringcount - count of widthoff - offset on the right.public static int countHalf(@Nullable
@Nullable CharSequence str)
Copyright © 2023. All rights reserved.