static bool endsWith(S a, S b) { ret a != null && a.endsWith(b); } static bool endsWith(S a, char c) { ret nempty(a) && lastChar(a) == c; } ifclass Matches static bool endsWith(S a, S b, Matches m) { if (!endsWith(a, b)) false; m.m = new S[] {dropLast(l(b), a)}; true; } endif