1 | sS minusLinesContaining(S pat, S s) { |
2 | LS lines = lines(s); |
3 | LS lines2 = filter(lines, l -> !contains(l, pat)); |
4 | if (l(lines2) == l(lines)) ret s; |
5 | ret lines_possiblyRTrim(s, lines2); |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025504 |
Snippet name: | minusLinesContaining |
Eternal ID of this version: | #1025504/1 |
Text MD5: | 82bff8b3f6e4f4144892ed4a072c3d7b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-01 15:52:09 |
Source code size: | 194 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 183 / 223 |
Referenced in: | [show references] |