Libraryless. Click here for Pure Java version (10034L/55K).
1 | static class Matches { |
2 | String[] m; |
3 | |
4 | *() {} |
5 | *(S... *m) {} |
6 | |
7 | String get(int i) { return i < m.length ? m[i] : null; } |
8 | String unq(int i) { return unquote(get(i)); } |
9 | ifdef Matches_fsi |
10 | String fsi(int i) { return formatSnippetID(unq(i)); } |
11 | String fsi() { return fsi(0); } |
12 | endifdef |
13 | String tlc(int i) { return unq(i).toLowerCase(); } |
14 | boolean bool(int i) { return "true".equals(unq(i)); } |
15 | String rest() { return m[m.length-1]; } // for matchStart |
16 | int psi(int i) { return Integer.parseInt(unq(i)); } |
17 | |
18 | toString { ret "Matches(" + joinWithComma(quoteAll(asList(m))) + ")"; } |
19 | |
20 | public int hashCode() { ret _hashCode(toList(m)); } |
21 | public bool equals(O o) { ret o instanceof Matches && arraysEqual(m, o/Matches.m); } |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 27 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, fehiwqupcyrn, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, jtubtzbbkimh, lhdilzshxjzv, lnbujpyubztb, lpdgvwnxivlt, lulzaavyztxj, mqqgnosmbjvj, mqsvbyillbrs, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, wtqryiryparv, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1001496 |
Snippet name: | class Matches |
Eternal ID of this version: | #1001496/10 |
Text MD5: | 5b54074f769b5fa527b3e133833330c4 |
Transpilation MD5: | 7a89fe6837017e135f95a06a72705919 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-02 11:52:06 |
Source code size: | 764 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 1054 / 20221 |
Version history: | 9 change(s) |
Referenced in: | [show references] |