1 | static S dropGlobalID(S s) {
|
2 | s = rtrim(s); |
3 | if (!endsWith(s, "]")) ret s; |
4 | Matcher m = regexpMatcher("\\[id: [a-z]{" + globalIDLength() + "}\\]$", s);
|
5 | ret m.find() ? rtrim(takeFirst(regexpMatcherIndex(m), s)) : s; |
6 | } |
Began life as a copy of #1016960
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1016963 |
| Snippet name: | dropGlobalID - drop "[id: dfjsfdsf]" suffix; also rtrims |
| Eternal ID of this version: | #1016963/6 |
| Text MD5: | ad95adb711d1935f643505b25d114cf7 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-28 17:50:40 |
| Source code size: | 226 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 810 / 831 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |