1 | static L<S> ai_splitAroundPhrase_orNull(S s, S phrase) { |
2 | ret ai_splitAroundPhrase_orNull(javaTokWithBrackets(s), phrase); |
3 | } |
4 | |
5 | static L<S> ai_splitAroundPhrase_orNull(LS tok, S phrase) { |
6 | S[] _phrase = toStringArray(javaTokC(phrase)); |
7 | int i = findCodeTokensIC(tok, _phrase); |
8 | ret i < 0 ? null : ll(trimJoinSubList(tok, 0, i), trimJoinSubList(tok, i+l(_phrase)*2)); |
9 | } |
Began life as a copy of #1013387
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: | #1021988 |
Snippet name: | ai_splitAroundPhrase_orNull - split at a phrase such as. "iff it", drops the phrase itself |
Eternal ID of this version: | #1021988/2 |
Text MD5: | 635aafc7fce25eb92e71eff3e1405fc9 |
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:32 |
Source code size: | 380 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 260 / 295 |
Version history: | 1 change(s) |
Referenced in: | [show references] |