常用范围:
- 大写字母(A-Z):65 (A)~ 90(Z)
- 小写字母(a-z):97(a) ~ 122(z)
- 字符数字('0' ~ '9'):48('0') ~ 57('9')
一段jdk8的代码,有兴趣的同学可以玩玩
public static void main(String[] args) {
Stream.of("Apsara", "2019", "9.25-9.27", "Digital Economy")
.map(x -> 57 == x.charAt(0) ? "Here is the" : 50 == x.charAt(0) ? x.concat(":") : x)
// .peek(x-> System.out.println(x.charAt(0)))
.reduce((x, y) -> x + " " + y).ifPresent(System.out::println);
}