1 | static L<S> ai_splitAroundPhrase(S s, S phrase) { |
2 | ret ai_splitAroundPhrase(javaTokWithBrackets(s), phrase); |
3 | } |
4 | |
5 | static L<S> ai_splitAroundPhrase(LS tok, S phrase) { |
6 | S[] _phrase = toStringArray(javaTokC(phrase)); |
7 | int i = findCodeTokensIC(tok, _phrase); |
8 | ret i < 0 ? ll(join(tok)) : ll(trimJoinSubList(tok, 0, i), trimJoinSubList(tok, i+l(_phrase)*2)); |
9 | } |
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: | #1013387 |
Snippet name: | ai_splitAroundPhrase - split at a phrase such as. "iff it", drops the phrase itself |
Eternal ID of this version: | #1013387/7 |
Text MD5: | 042421999f21dcf346e31881bcc0dc31 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-04 17:35:00 |
Source code size: | 368 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 416 / 483 |
Version history: | 6 change(s) |
Referenced in: | [show references] |