sS tok_removeModifier(S s, S modifier) { ret join(tok_removeModifier(javaTok(s), modifier)); } static LS tok_removeModifier(LS tok, S modifier) { for (int i : jfindAll(tok, modifier)) { tok.set(i, ""); tok.set(i+1, dropPrefix(" ", tok.get(i+1))); } ret tok; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1021102 |
| Snippet name: | tok_removeModifier - also removes extra spaces |
| Eternal ID of this version: | #1021102/2 |
| Text MD5: | a92a781de6eb31685945d2eb4d9974a9 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-01-22 16:49:51 |
| Source code size: | 286 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 486 / 489 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |