@Test public void testSplit() { MutableString ms1 = new MutableString("abc,def,ghi"); MutableString[] parts = ms1.split(","); assertEquals(3, parts.length); assertEquals("abc", parts[0].toString()); assertEquals("def", parts[1].toString()); assertEquals("ghi", parts[2].toString()); }
public MutableString[] split(String regex) { String[] splitted = m_string.split(regex); MutableString[] out = new MutableString[splitted.length]; for (int i = 0; i < splitted.length; i++) { out[i] = new MutableString(splitted[i]); } return out; }
MutableString { public MutableString[] split(String regex) { String[] splitted = m_string.split(regex); MutableString[] out = new MutableString[splitted.length]; for (int i = 0; i < splitted.length; i++) { out[i] = new MutableString(splitted[i]); } return out; } }
MutableString { public MutableString[] split(String regex) { String[] splitted = m_string.split(regex); MutableString[] out = new MutableString[splitted.length]; for (int i = 0; i < splitted.length; i++) { out[i] = new MutableString(splitted[i]); } return out; } MutableString();  MutableString(String s);  MutableString(MutableString s); }
MutableString { public MutableString[] split(String regex) { String[] splitted = m_string.split(regex); MutableString[] out = new MutableString[splitted.length]; for (int i = 0; i < splitted.length; i++) { out[i] = new MutableString(splitted[i]); } return out; } MutableString();  MutableString(String s);  MutableString(MutableString s); void clear(); int indexOf(String s); int indexOf(String s, int fromIndex); void trim(); int length(); MutableString[] split(String regex); MutableString truncateSubstring(int begin, int end); MutableString truncateSubstring(int begin); MutableString substring(int start, int end); MutableString substring(int start); boolean startsWith(String s); boolean startsWithIgnoreCase(String s); boolean endsWith(String s); boolean endsWithIgnoreCase(String s); boolean is(String s); @Override boolean equals(Object o); @Override int hashCode(); boolean isEmpty(); void replaceAll(String regex, String replacement); @Override String toString(); }
MutableString { public MutableString[] split(String regex) { String[] splitted = m_string.split(regex); MutableString[] out = new MutableString[splitted.length]; for (int i = 0; i < splitted.length; i++) { out[i] = new MutableString(splitted[i]); } return out; } MutableString();  MutableString(String s);  MutableString(MutableString s); void clear(); int indexOf(String s); int indexOf(String s, int fromIndex); void trim(); int length(); MutableString[] split(String regex); MutableString truncateSubstring(int begin, int end); MutableString truncateSubstring(int begin); MutableString substring(int start, int end); MutableString substring(int start); boolean startsWith(String s); boolean startsWithIgnoreCase(String s); boolean endsWith(String s); boolean endsWithIgnoreCase(String s); boolean is(String s); @Override boolean equals(Object o); @Override int hashCode(); boolean isEmpty(); void replaceAll(String regex, String replacement); @Override String toString();  }