摘要: 字符串长度都是调用String类的length()方法,通常这样就可以,但是现在项目中需要汉字的长度是2,所以说需要换个写法 public static int stringLength(String str) { int stringLength = 0; try { if (str != nul 阅读全文
posted @ 2021-11-08 14:15 山丘i 阅读(914) 评论(1) 推荐(0) 编辑