int count = key.length() - key.replaceAll(":", "").length();
- Java求一个字符串中,指定字符串出现的次数
- https://blog.csdn.net/qq_19533277/article/details/83039659
int count = key.length() - key.replaceAll(":", "").length();
转载于:https://my.oschina.net/u/2464371/blog/3050645