@Test public void testToLines() { String s = "This\nis\nmy\nString"; String[] lines = StringUtilities.toLines(s); assertEquals(4, lines.length); assertEquals("This", lines[0]); assertEquals("is", lines[1]); assertEquals("my", lines[2]); assertEquals("String", lines[3]); }
public static String[] toLines(String str) { return toLines(str, true); }
StringUtilities { public static String[] toLines(String str) { return toLines(str, true); } }
StringUtilities { public static String[] toLines(String str) { return toLines(str, true); } private  StringUtilities(); }
StringUtilities { public static String[] toLines(String str) { return toLines(str, true); } private  StringUtilities(); static boolean isControlCharacterOrBackslash(char c); static boolean isControlCharacterOrBackslash(int codePoint); static boolean isDoubleQuoted(String str); static String extractFromDoubleQuotes(String str); static boolean isDisplayable(int c); static boolean isAllBlank(CharSequence... sequences); static String characterToString(char c); static int countOccurrences(String string, char occur); static boolean equals(String s1, String s2, boolean caseSensitive); static boolean endsWithWhiteSpace(String string); static String toQuotedString(byte[] bytes); static String toQuotedString(byte[] bytes, int charSize); static boolean startsWithIgnoreCase(String string, String prefix); static boolean endsWithIgnoreCase(String string, String postfix); static boolean containsIgnoreCase(String containingString, String substring); static boolean containsAll(CharSequence toSearch, CharSequence... searches); static boolean containsAllIgnoreCase(CharSequence toSearch, CharSequence... searches); static int indexOfWord(String text, String searchWord); static boolean isWholeWord(String text, int startIndex, int length); static int indexOfIgnoreCase(String containingString, String substring); static int indexOfIgnoreCase(String containingString, String substring, int index); static int lastIndexOfIgnoreCase(String containingString, String substring); static String convertTabsToSpaces(String str, int tabSize); static String[] toLines(String str); static String[] toLines(String s, boolean preserveTokens); static String toFixedSize(String s, char pad, int size); @Deprecated static String padString(String source, char filler, int length); static String pad(String source, char filler, int length); static String indentLines(String s, String indent); static String findWord(String s, int index); static String findWord(String s, int index, char[] charsToAllow); static WordLocation findWordLocation(String s, int index, char[] charsToAllow); static boolean isWordChar(char c, char[] charsToAllow); static int findLastWordPosition(String s); static String getLastWord(String s, String separator); static String toString(int value); static String toString(List<?> list, String separator); static String toStringWithIndent(Object o); static String reverse(String s); static String mergeStrings(String string1, String string2); static String trim(String original, int max); static String trimTrailingNulls(String s); static String trimMiddle(String s, int max); static String fixMultipleAsterisks(String value); static boolean isValidCLanguageChar(char c); static boolean isAsciiChar(char c); static boolean isAsciiChar(int codePoint); static String convertEscapeSequences(String str); static String convertControlCharsToEscapeSequences(String str); static String convertCodePointToEscapeSequence(int codePoint); static boolean isUnicodeReplacementCodePoint(int codePoint); }
StringUtilities { public static String[] toLines(String str) { return toLines(str, true); } private  StringUtilities(); static boolean isControlCharacterOrBackslash(char c); static boolean isControlCharacterOrBackslash(int codePoint); static boolean isDoubleQuoted(String str); static String extractFromDoubleQuotes(String str); static boolean isDisplayable(int c); static boolean isAllBlank(CharSequence... sequences); static String characterToString(char c); static int countOccurrences(String string, char occur); static boolean equals(String s1, String s2, boolean caseSensitive); static boolean endsWithWhiteSpace(String string); static String toQuotedString(byte[] bytes); static String toQuotedString(byte[] bytes, int charSize); static boolean startsWithIgnoreCase(String string, String prefix); static boolean endsWithIgnoreCase(String string, String postfix); static boolean containsIgnoreCase(String containingString, String substring); static boolean containsAll(CharSequence toSearch, CharSequence... searches); static boolean containsAllIgnoreCase(CharSequence toSearch, CharSequence... searches); static int indexOfWord(String text, String searchWord); static boolean isWholeWord(String text, int startIndex, int length); static int indexOfIgnoreCase(String containingString, String substring); static int indexOfIgnoreCase(String containingString, String substring, int index); static int lastIndexOfIgnoreCase(String containingString, String substring); static String convertTabsToSpaces(String str, int tabSize); static String[] toLines(String str); static String[] toLines(String s, boolean preserveTokens); static String toFixedSize(String s, char pad, int size); @Deprecated static String padString(String source, char filler, int length); static String pad(String source, char filler, int length); static String indentLines(String s, String indent); static String findWord(String s, int index); static String findWord(String s, int index, char[] charsToAllow); static WordLocation findWordLocation(String s, int index, char[] charsToAllow); static boolean isWordChar(char c, char[] charsToAllow); static int findLastWordPosition(String s); static String getLastWord(String s, String separator); static String toString(int value); static String toString(List<?> list, String separator); static String toStringWithIndent(Object o); static String reverse(String s); static String mergeStrings(String string1, String string2); static String trim(String original, int max); static String trimTrailingNulls(String s); static String trimMiddle(String s, int max); static String fixMultipleAsterisks(String value); static boolean isValidCLanguageChar(char c); static boolean isAsciiChar(char c); static boolean isAsciiChar(int codePoint); static String convertEscapeSequences(String str); static String convertControlCharsToEscapeSequences(String str); static String convertCodePointToEscapeSequence(int codePoint); static boolean isUnicodeReplacementCodePoint(int codePoint); static final Pattern DOUBLE_QUOTED_STRING_PATTERN; final static String LINE_SEPARATOR; static final int UNICODE_REPLACEMENT; static final int UNICODE_BE_BYTE_ORDER_MARK; static final int UNICODE_LE16_BYTE_ORDER_MARK; static final int UNICODE_LE32_BYTE_ORDER_MARK; }