@Test void trimStart() { Assertions.assertAll( () -> Assertions.assertEquals("test", StringUtils.trimStart("test")), () -> Assertions.assertEquals("test ", StringUtils.trimStart("test ")), () -> Assertions.assertEquals("", StringUtils.trimStart("")), () -> Assertions.assertEquals("", StringUtils.trimStart(" ")), () -> Assertions.assertEquals("test", StringUtils.trimStart(" test")) ); }
public static String trimStart(String text) { char[] chars = text.toCharArray(); int index = 0; while (index < chars.length && chars[index] <= ' ') { index++; } return text.substring(index, chars.length); }
StringUtils { public static String trimStart(String text) { char[] chars = text.toCharArray(); int index = 0; while (index < chars.length && chars[index] <= ' ') { index++; } return text.substring(index, chars.length); } }
StringUtils { public static String trimStart(String text) { char[] chars = text.toCharArray(); int index = 0; while (index < chars.length && chars[index] <= ' ') { index++; } return text.substring(index, chars.length); } private  StringUtils(); }
StringUtils { public static String trimStart(String text) { char[] chars = text.toCharArray(); int index = 0; while (index < chars.length && chars[index] <= ' ') { index++; } return text.substring(index, chars.length); } private  StringUtils(); static String[] splitFirst(String text, String delimiter); static String[] split(String text, String delimiter); static int lastIndexOfBefore(String text, String element, int occurrences); static int lastIndexOf(String text, String element, int toIndex); static String replace(String text, String searchString, String replacement); static String replaceFirst(String text, String pattern, String replacement); static String replaceFirst(String text, String pattern, String replacement, int start); static String replaceRespectively(String text, String pattern, String... values); static String replaceRespectivelyAndSoftly(String text, String pattern, String... values); static String capitalize(String text); static boolean startsWith(String text, Predicate<char[]> filter); static String trimStart(String text); static String trimEnd(String text); static String extractParagraph(String str); static String buildSpace(int spaces); static String repeated(int repetitions, String... elements); static int countOccurrences(String text, String element); static boolean containsCharacter(String text, char... characters); static boolean containsSpecialCharacters(String text); static boolean containsOtherCharacters(String text, char[]... characters); static String join(String... strings); static String toString(@Nullable Object object); static boolean isNumber(String str); static String isEmpty(String text, String exceptionMessage); static boolean isEmpty(String text); }
StringUtils { public static String trimStart(String text) { char[] chars = text.toCharArray(); int index = 0; while (index < chars.length && chars[index] <= ' ') { index++; } return text.substring(index, chars.length); } private  StringUtils(); static String[] splitFirst(String text, String delimiter); static String[] split(String text, String delimiter); static int lastIndexOfBefore(String text, String element, int occurrences); static int lastIndexOf(String text, String element, int toIndex); static String replace(String text, String searchString, String replacement); static String replaceFirst(String text, String pattern, String replacement); static String replaceFirst(String text, String pattern, String replacement, int start); static String replaceRespectively(String text, String pattern, String... values); static String replaceRespectivelyAndSoftly(String text, String pattern, String... values); static String capitalize(String text); static boolean startsWith(String text, Predicate<char[]> filter); static String trimStart(String text); static String trimEnd(String text); static String extractParagraph(String str); static String buildSpace(int spaces); static String repeated(int repetitions, String... elements); static int countOccurrences(String text, String element); static boolean containsCharacter(String text, char... characters); static boolean containsSpecialCharacters(String text); static boolean containsOtherCharacters(String text, char[]... characters); static String join(String... strings); static String toString(@Nullable Object object); static boolean isNumber(String str); static String isEmpty(String text, String exceptionMessage); static boolean isEmpty(String text); static final String EMPTY; static final String[] EMPTY_ARRAY; }