static bool jMatchStart(S pat, S s) { return jMatchStart(pat, s, null); } // matches are as you expect, plus an extra item for the rest string static bool jMatchStart(S pat, S s, Matches matches) { if (s == null) return false; L tokpat = jfind_preprocess(javaTok(pat)), toks = javaTok(s); if (toks.size() < tokpat.size()) ret false; S[] m = match2(tokpat, toks.subList(0, tokpat.size())); if (m == null) false; if (matches != null) { matches.m = new S[m.length+1]; arraycopy(m, matches.m); matches.m[m.length] = join(toks.subList(tokpat.size(), toks.size())); // for Matches.rest() } true; }