@Ignore @Test public void test_split_no_escape_simple_1() { String s = "a b"; Iterator<String> r = splitRespectEscape(s, ' ').iterator(); assertTrue(r.hasNext()); assertEquals("a", r.next()); assertTrue(r.hasNext()); assertEquals("b", r.next()); }
public static Iterable<String> splitRespectEscape(String s, char c) { String cs = shouldEscape(c) ? "\\" + c : Character.toString(c); Pattern p = Pattern.compile("[^\\\\]" + cs); return Splitter.on(p).omitEmptyStrings().trimResults().split(s); }
StringUtils { public static Iterable<String> splitRespectEscape(String s, char c) { String cs = shouldEscape(c) ? "\\" + c : Character.toString(c); Pattern p = Pattern.compile("[^\\\\]" + cs); return Splitter.on(p).omitEmptyStrings().trimResults().split(s); } }
StringUtils { public static Iterable<String> splitRespectEscape(String s, char c) { String cs = shouldEscape(c) ? "\\" + c : Character.toString(c); Pattern p = Pattern.compile("[^\\\\]" + cs); return Splitter.on(p).omitEmptyStrings().trimResults().split(s); }  }
StringUtils { public static Iterable<String> splitRespectEscape(String s, char c) { String cs = shouldEscape(c) ? "\\" + c : Character.toString(c); Pattern p = Pattern.compile("[^\\\\]" + cs); return Splitter.on(p).omitEmptyStrings().trimResults().split(s); }  static boolean isEmpty(String s); static boolean isNotEmpty(String s); static boolean isBlank(String s); static boolean isNotBlank(String s); static String mapToJson(Map<String, Object> map); static Iterable<String> splitRespectEscape(String s, char c); static byte[] append(byte[] orig, String toAppend); static byte[] append(byte[] existing, byte[] addition); static byte[] append(byte[] existing, byte[] addition, byte delimiter); }
StringUtils { public static Iterable<String> splitRespectEscape(String s, char c) { String cs = shouldEscape(c) ? "\\" + c : Character.toString(c); Pattern p = Pattern.compile("[^\\\\]" + cs); return Splitter.on(p).omitEmptyStrings().trimResults().split(s); }  static boolean isEmpty(String s); static boolean isNotEmpty(String s); static boolean isBlank(String s); static boolean isNotBlank(String s); static String mapToJson(Map<String, Object> map); static Iterable<String> splitRespectEscape(String s, char c); static byte[] append(byte[] orig, String toAppend); static byte[] append(byte[] existing, byte[] addition); static byte[] append(byte[] existing, byte[] addition, byte delimiter);  }