public static String substringBefore(String s, String splitter) {
        int endIndex = s.indexOf(splitter);
        if (endIndex >= 0) {
            return s.substring(0, endIndex);
        }
        return s;
    }
@Test
    void testSubstringBeforeSplitterSingleChar() {
        assertThat(substringBefore("15", "-")).isEqualTo("15");
        assertThat(substringBefore("15-ea", "-")).isEqualTo("15");
    }