sbool match3_startOrEndOfLine(S pat, S s, bool startOfLine, bool endOfLine) { if (startOfLine) ret endOfLine ? match3(pat, s) : matchStart(pat, s); else ret endOfLine ? matchEnd(pat, s) : find3(pat, s); }