@Test public void testTrim() { assertEquals("", StringUtils.trim("")); assertEquals("", StringUtils.trim(" ")); assertEquals("A", StringUtils.trim(" A")); assertEquals("A", StringUtils.trim("A ")); assertEquals("A", StringUtils.trim(" A ")); assertEquals("", StringUtils.trim("\u00A0")); assertEquals("A", StringUtils.trim("\u00A0A")); assertEquals("A", StringUtils.trim("A\u00A0")); assertEquals("A", StringUtils.trim("\u00A0A\u00A0")); assertEquals("", StringUtils.trim("\u00A0 ")); assertEquals("A", StringUtils.trim("\u00A0 A")); assertEquals("A", StringUtils.trim("A\u00A0 ")); assertEquals("A", StringUtils.trim("\u00A0 A \u00A0")); }
public static String trim(final @NonNull String str) { return str.replace('\u00A0', ' ').trim().replaceAll(" +", " "); }
StringUtils { public static String trim(final @NonNull String str) { return str.replace('\u00A0', ' ').trim().replaceAll(" +", " "); } }
StringUtils { public static String trim(final @NonNull String str) { return str.replace('\u00A0', ' ').trim().replaceAll(" +", " "); } private  StringUtils(); }
StringUtils { public static String trim(final @NonNull String str) { return str.replace('\u00A0', ' ').trim().replaceAll(" +", " "); } private  StringUtils(); static boolean isEmail(final @NonNull CharSequence str); static boolean isEmpty(final @Nullable String str); static boolean isPresent(final @Nullable String str); static boolean isValidPassword(final @Nullable String str); static @NonNull String sentenceCase(final @NonNull String str); static String trim(final @NonNull String str); static @NonNull String wrapInParentheses(final @NonNull String str); }
StringUtils { public static String trim(final @NonNull String str) { return str.replace('\u00A0', ' ').trim().replaceAll(" +", " "); } private  StringUtils(); static boolean isEmail(final @NonNull CharSequence str); static boolean isEmpty(final @Nullable String str); static boolean isPresent(final @Nullable String str); static boolean isValidPassword(final @Nullable String str); static @NonNull String sentenceCase(final @NonNull String str); static String trim(final @NonNull String str); static @NonNull String wrapInParentheses(final @NonNull String str); static final int MINIMUM_PASSWORD_LENGTH; }