public static int count(@Nonnull String pattern, @Nullable String text) {
		if (text == null || text.isEmpty())
			return 0;
		int count = 0;
		while (text.contains(pattern)) {
			text = text.replaceFirst(pattern, "");
			count++;
		}
		return count;
	}
@Test
	void testCount() {
		assertEquals(0, StringUtil.count('a', null));
		assertEquals(0, StringUtil.count("a", null));
		assertEquals(0, StringUtil.count('a', ""));
		assertEquals(0, StringUtil.count("a", ""));
		assertEquals(0, StringUtil.count('a', "foo"));
		assertEquals(0, StringUtil.count("a", "foo"));
		assertEquals(2, StringUtil.count('a', "example bar"));
		assertEquals(2, StringUtil.count("a", "example bar"));
	}