If you use StringUtils provided by Apache Library,
int count = StringUtils.countMatches("a.b.c.d", ".");
are available.
In the Spring framework,
intocus = StringUtils.countOccurrencesOf("a.b.c.d", ".");
is available.
© 2024 OneMinuteCode. All rights reserved.