test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.file: karate-core/src/test/java/com/intuit/karate/StringUtilsTest.java
test_class.identifier: StringUtilsTest
test_case.body: @Test
      public void testSplit() {
          List<String> list = StringUtils.split("", '/', false);
          assertEquals(1, list.size());
          assertEquals("", list.get(0));
          list = StringUtils.split("//", '/', false);
          assertEquals(0, list.size());
          list = StringUtils.split("foo", '/', false);
          assertEquals(1, list.size());
          assertEquals("foo", list.get(0));
          list = StringUtils.split("foo/", '/', false);
          assertEquals(1, list.size());
          assertEquals("foo", list.get(0));
          list = StringUtils.split("/foo", '/', false);
          assertEquals(1, list.size());
          assertEquals("foo", list.get(0));
          list = StringUtils.split("/foo/bar", '/', false);
          assertEquals(2, list.size());
          assertEquals("foo", list.get(0));
          assertEquals("bar", list.get(1));
          list = StringUtils.split("|pi\\|pe|blah|", '|', true);
          assertEquals(2, list.size());
          assertEquals("pi|pe", list.get(0));
          assertEquals("blah", list.get(1));
      }
test_case.class_method_signature: StringUtilsTest.testSplit()
test_case.full_signature: @Test public void testSplit()
test_case.identifier: testSplit
test_case.invocations: split assertEquals size assertEquals get split assertEquals size split assertEquals size assertEquals get split assertEquals size assertEquals get split assertEquals size assertEquals get split assertEquals size assertEquals get assertEquals get split assertEquals size assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSplit()
focal_class.declarator: EMPTY = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String EMPTY = "";
focal_class.type: String
focal_class.var_name: EMPTY
focal_class.declarator: FUNCTION_PATTERN = Pattern.compile("^function[^(]*\\(")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern FUNCTION_PATTERN = Pattern.compile("^function[^(]*\\(");
focal_class.type: Pattern
focal_class.var_name: FUNCTION_PATTERN
focal_class.file: karate-core/src/main/java/com/intuit/karate/StringUtils.java
focal_class.identifier: StringUtils
focal_class.class_method_signature: StringUtils.StringUtils()
focal_class.full_signature: private  StringUtils()
focal_class.identifier: StringUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  StringUtils()
focal_class.class_method_signature: StringUtils.pair(String left, String right)
focal_class.full_signature: public static Pair pair(String left, String right)
focal_class.identifier: pair
focal_class.modifiers: public static
focal_class.parameters: (String left, String right)
focal_class.return: Pair
focal_class.signature: Pair pair(String left, String right)
focal_class.class_method_signature: StringUtils.truncate(String s, int length, boolean addDots)
focal_class.full_signature: public static String truncate(String s, int length, boolean addDots)
focal_class.identifier: truncate
focal_class.modifiers: public static
focal_class.parameters: (String s, int length, boolean addDots)
focal_class.return: String
focal_class.signature: String truncate(String s, int length, boolean addDots)
focal_class.class_method_signature: StringUtils.trimToEmpty(String s)
focal_class.full_signature: public static String trimToEmpty(String s)
focal_class.identifier: trimToEmpty
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String trimToEmpty(String s)
focal_class.class_method_signature: StringUtils.trimToNull(String s)
focal_class.full_signature: public static String trimToNull(String s)
focal_class.identifier: trimToNull
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String trimToNull(String s)
focal_class.class_method_signature: StringUtils.repeat(char c, int count)
focal_class.full_signature: public static String repeat(char c, int count)
focal_class.identifier: repeat
focal_class.modifiers: public static
focal_class.parameters: (char c, int count)
focal_class.return: String
focal_class.signature: String repeat(char c, int count)
focal_class.class_method_signature: StringUtils.join(Object[] a, char delimiter)
focal_class.full_signature: public static String join(Object[] a, char delimiter)
focal_class.identifier: join
focal_class.modifiers: public static
focal_class.parameters: (Object[] a, char delimiter)
focal_class.return: String
focal_class.signature: String join(Object[] a, char delimiter)
focal_class.class_method_signature: StringUtils.join(Collection<String> c, char delimiter)
focal_class.full_signature: public static String join(Collection<String> c, char delimiter)
focal_class.identifier: join
focal_class.modifiers: public static
focal_class.parameters: (Collection<String> c, char delimiter)
focal_class.return: String
focal_class.signature: String join(Collection<String> c, char delimiter)
focal_class.class_method_signature: StringUtils.split(String s, char delimiter, boolean skipBackSlash)
focal_class.full_signature: public static List<String> split(String s, char delimiter, boolean skipBackSlash)
focal_class.identifier: split
focal_class.modifiers: public static
focal_class.parameters: (String s, char delimiter, boolean skipBackSlash)
focal_class.return: List<String>
focal_class.signature: List<String> split(String s, char delimiter, boolean skipBackSlash)
focal_class.class_method_signature: StringUtils.isBlank(String s)
focal_class.full_signature: public static boolean isBlank(String s)
focal_class.identifier: isBlank
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: boolean
focal_class.signature: boolean isBlank(String s)
focal_class.class_method_signature: StringUtils.toIdString(String name)
focal_class.full_signature: public static String toIdString(String name)
focal_class.identifier: toIdString
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String toIdString(String name)
focal_class.class_method_signature: StringUtils.splitByFirstLineFeed(String text)
focal_class.full_signature: public static StringUtils.Pair splitByFirstLineFeed(String text)
focal_class.identifier: splitByFirstLineFeed
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: StringUtils.Pair
focal_class.signature: StringUtils.Pair splitByFirstLineFeed(String text)
focal_class.class_method_signature: StringUtils.toStringLines(String text)
focal_class.full_signature: public static List<String> toStringLines(String text)
focal_class.identifier: toStringLines
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: List<String>
focal_class.signature: List<String> toStringLines(String text)
focal_class.class_method_signature: StringUtils.countLineFeeds(String text)
focal_class.full_signature: public static int countLineFeeds(String text)
focal_class.identifier: countLineFeeds
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: int
focal_class.signature: int countLineFeeds(String text)
focal_class.class_method_signature: StringUtils.wrappedLinesEstimate(String text, int colWidth)
focal_class.full_signature: public static int wrappedLinesEstimate(String text, int colWidth)
focal_class.identifier: wrappedLinesEstimate
focal_class.modifiers: public static
focal_class.parameters: (String text, int colWidth)
focal_class.return: int
focal_class.signature: int wrappedLinesEstimate(String text, int colWidth)
focal_class.class_method_signature: StringUtils.isJavaScriptFunction(String text)
focal_class.full_signature: public static boolean isJavaScriptFunction(String text)
focal_class.identifier: isJavaScriptFunction
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: boolean
focal_class.signature: boolean isJavaScriptFunction(String text)
focal_class.class_method_signature: StringUtils.fixJavaScriptFunction(String text)
focal_class.full_signature: public static String fixJavaScriptFunction(String text)
focal_class.identifier: fixJavaScriptFunction
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: String
focal_class.signature: String fixJavaScriptFunction(String text)
focal_method.body: public static List<String> split(String s, char delimiter, boolean skipBackSlash) {
          int pos = s.indexOf(delimiter);
          if (pos == -1) {
              return Collections.singletonList(s);
          }
          List<String> list = new ArrayList();
          int startPos = 0;
          int searchPos = 0;
          while (pos != -1) {
              if (skipBackSlash && pos > 0 && s.charAt(pos - 1) == '\\') {
                  s = s.substring(0, pos - 1) + s.substring(pos);
                  searchPos = pos;
              } else {
                  String temp = s.substring(startPos, pos);
                  if (!EMPTY.equals(temp)) {
                      list.add(temp);
                  }
                  startPos = pos + 1;
                  searchPos = startPos;
              }
              pos = s.indexOf(delimiter, searchPos);
          }
          if (startPos != s.length()) {
              String temp = s.substring(startPos);
              if (!EMPTY.equals(temp)) {
                  list.add(temp);
              }
          }
          return list;
      }
focal_method.class_method_signature: StringUtils.split(String s, char delimiter, boolean skipBackSlash)
focal_method.full_signature: public static List<String> split(String s, char delimiter, boolean skipBackSlash)
focal_method.identifier: split
focal_method.invocations: indexOf singletonList charAt substring substring substring equals add indexOf length substring equals add
focal_method.modifiers: public static
focal_method.parameters: (String s, char delimiter, boolean skipBackSlash)
focal_method.return: List<String>
focal_method.signature: List<String> split(String s, char delimiter, boolean skipBackSlash)