public FastStr beforeFirst(FastStr s) { int pos = indexOf(s); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
@Override public FastStr beforeLast(char c) { int pos = lastIndexOf(c); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
@Override public FastStr afterFirst(char c) { int pos = indexOf(c); if (pos < 0) return EMPTY_STR; return substr(pos + 1); }
@Override public FastStr afterLast(char c) { int pos = lastIndexOf(c); if (pos < 0) return EMPTY_STR; return substr(pos + 1); }
public FastStr beforeLast(FastStr s) { int pos = lastIndexOf(s); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
public FastStr beforeFirst(FastStr s) { int pos = indexOf(s); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
@Override public FastStr afterFirst(char c) { int pos = indexOf(c); if (pos < 0) return EMPTY_STR; return substr(pos + 1); }
@Override public FastStr afterLast(char c) { int pos = lastIndexOf(c); if (pos < 0) return EMPTY_STR; return substr(pos + 1); }
@Override public FastStr beforeFirst(char c) { int pos = indexOf(c); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
@Override public FastStr beforeLast(char c) { int pos = lastIndexOf(c); if (pos < 0) return EMPTY_STR; return substr(0, pos); }
@Override public FastStr afterFirst(FastStr s) { int pos = indexOf(s); if (pos < 0) return EMPTY_STR; return substr(pos + s.size()); }
@Override public FastStr afterLast(FastStr s) { int pos = lastIndexOf(s); if (pos < 0) return EMPTY_STR; return substr(pos + s.size()); }
@Override public FastStr afterLast(FastStr s) { int pos = lastIndexOf(s); if (pos < 0) return EMPTY_STR; return substr(pos + s.size()); }
protected T targetVersion(JavaVersion version) { targetVersion = FastStr.of(version.name()).substr(1).replace('_', '.').toString(); return me(); }
protected T sourceVersion(JavaVersion version) { sourceVersion = FastStr.of(version.name()).substr(1).replace('_', '.').toString(); return me(); }
private $.T2<String, String> splitActionStr(String action) { FastStr fs = FastStr.of(action); FastStr fs1 = fs.beforeFirst(':'); FastStr fs2 = fs1.isEmpty() ? fs : fs.substr(fs1.length() + 1); return $.T2(fs1.trim().toString(), fs2.trim().toString()); }
private $.T2<String, String> splitActionStr(String action) { FastStr fs = FastStr.of(action); FastStr fs1 = fs.beforeFirst(':'); FastStr fs2 = fs1.isEmpty() ? fs : fs.substr(fs1.length() + 1); return $.T2(fs1.trim().toString(), fs2.trim().toString()); }