
string工具类
sfreedt
这个作者很懒,什么都没留下…
展开
-
string和map相互转换
String str = JSON.toJSONString(map); Map map1 = (Map)JSON.parse(map);原创 2021-03-10 20:50:01 · 566 阅读 · 0 评论 -
短字符串在长字符串中出现的次数
@Test public void test1(){ String sLong = "123131241242421"; String sShort ="24"; int i = 0; //短字符串出现的次数 int num = 0 ; while (i>= 0){ i = sLong.indexOf(sShort, i); if (i<0)原创 2021-01-29 16:27:19 · 437 阅读 · 0 评论