@Nonnull
	public static String cutOffAtLast(@Nonnull String text, char cutoff) {
		int i = text.lastIndexOf(cutoff);
		if (i < 0) return text;
		return text.substring(0, i);
	}
@Test
	void testCutOffAtLast() {
		// chars
		assertEquals("", StringUtil.cutOffAtLast("", 'd'));
		assertEquals("abc", StringUtil.cutOffAtLast("abcdefg", 'd'));
		assertEquals("abcdefg", StringUtil.cutOffAtLast("abcdefgd", 'd'));
		// strings
		assertEquals("", StringUtil.cutOffAtLast("", "d"));
		assertEquals("abc", StringUtil.cutOffAtLast("abcdefg", "d"));
		assertEquals("abcdefg", StringUtil.cutOffAtLast("abcdefgd", "d"));
	}