public final class StringKit extends Object
构造器和说明 |
---|
StringKit() |
限定符和类型 | 方法和说明 |
---|---|
static String |
alignLeft(Object o,
int width,
char c)
Fill a certain number of special characters on the right side of the string
|
static String |
alignRight(Object o,
int width,
char c)
Fill a certain number of special characters on the left side of the string
|
static String |
dup(char c,
int num)
Copy characters
|
static boolean |
equals(String str1,
String str2) |
static String |
fileExt(String fname) |
static boolean |
isAnyBlank(String... values)
There is at least one null in the array of strings
|
static boolean |
isBlank(String str)
Determine whether a string is blank
|
static boolean |
isNotBlank(String str)
Determine whether a string is not blank
|
static boolean |
isNumber(String value)
determines whether the string is a numeric format
|
static String |
mimeType(String fileName) |
static String |
rand(int size)
Generate a number of numeric strings randomly
|
static int |
rand(int min,
int max)
Randomly generate a number in the min and Max range
|
public static int rand(int min, int max)
min
- min valuemax
- max valuepublic static String rand(int size)
size
- string countpublic static boolean isNotBlank(String str)
str
- string valuepublic static boolean isBlank(String str)
str
- string valuepublic static boolean isAnyBlank(String... values)
values
- string arraypublic static boolean isNumber(String value)
value
- string valuepublic static String alignRight(Object o, int width, char c)
o
- objects that can be to Stringwidth
- number of charactersc
- characterspublic static String alignLeft(Object o, int width, char c)
o
- objects that can be to Stringwidth
- number of charactersc
- characterspublic static String dup(char c, int num)
c
- charactersnum
- character numberCopyright © 2017. All rights reserved.