@Test public void stripNewLines_removesTrailingCarriageReturns() { String result = Utility.stripNewLines("Test\r\r"); assertEquals("Test", result); }
public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); }
Utility { public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); } }
Utility { public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); }  }
Utility { public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); }  static boolean arrayContains(Object[] a, Object o); static boolean isAnyMimeType(String o, String... a); static boolean arrayContainsAny(Object[] a, Object... o); static String combine(Object[] parts, char separator); static String combine(Iterable<?> parts, char separator); static boolean requiredFieldValid(TextView view); static boolean requiredFieldValid(Editable s); static boolean domainFieldValid(EditText view); static void setCompoundDrawablesAlpha(TextView view, int alpha); static String wrap(String str, int wrapLength); static String wrap(String str, int wrapLength, String newLineStr, boolean wrapLongWords); static String stripSubject(final String subject); static String stripNewLines(String multiLineString); static boolean hasExternalImages(final String message); static void closeQuietly(final Cursor cursor); static boolean hasConnectivity(final Context context); static List<String> extractMessageIds(final String text); static String extractMessageId(final String text); static Handler getMainThreadHandler(); static void setContactForBadge(ContactBadge contactBadge,
                                          Address address); }
Utility { public static String stripNewLines(String multiLineString) { return multiLineString.replaceAll("[\\r\\n]", ""); }  static boolean arrayContains(Object[] a, Object o); static boolean isAnyMimeType(String o, String... a); static boolean arrayContainsAny(Object[] a, Object... o); static String combine(Object[] parts, char separator); static String combine(Iterable<?> parts, char separator); static boolean requiredFieldValid(TextView view); static boolean requiredFieldValid(Editable s); static boolean domainFieldValid(EditText view); static void setCompoundDrawablesAlpha(TextView view, int alpha); static String wrap(String str, int wrapLength); static String wrap(String str, int wrapLength, String newLineStr, boolean wrapLongWords); static String stripSubject(final String subject); static String stripNewLines(String multiLineString); static boolean hasExternalImages(final String message); static void closeQuietly(final Cursor cursor); static boolean hasConnectivity(final Context context); static List<String> extractMessageIds(final String text); static String extractMessageId(final String text); static Handler getMainThreadHandler(); static void setContactForBadge(ContactBadge contactBadge,
                                          Address address);  }