1 | static S dropFirstWord(S s) { |
2 | if (s == null) null; |
3 | L<S> tok = javaTok(s); |
4 | ret dropFirst(l(get(tok, 0))+l(get(tok, 1))+l(get(tok, 2)), s); |
5 | } |
6 | |
7 | static S dropFirstWord(S word, S s) { |
8 | if (s == null) null; |
9 | L<S> tok = javaTok(s); |
10 | if (!eqic(get(tok, 1), word)) ret s; |
11 | ret dropFirst(l(get(tok, 0))+l(get(tok, 1))+l(get(tok, 2)), s); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011059 |
Snippet name: | dropFirstWord - see firstWord (does not handle punctuation) |
Eternal ID of this version: | #1011059/3 |
Text MD5: | c855447c8d71bc96605a274f12887917 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-03 00:23:51 |
Source code size: | 350 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 464 / 476 |
Version history: | 2 change(s) |
Referenced in: | [show references] |