Libraryless. Click here for Pure Java version (2766L/16K).
1 | sbool startsWithAny(S a, Cl<S> b) { |
2 | fOr (S prefix : b) |
3 | if (startsWith(a, prefix)) |
4 | true; |
5 | false; |
6 | } |
7 | |
8 | sbool startsWithAny(S a, S... b) { |
9 | if (b != null) |
10 | fOr (S prefix : b) |
11 | if (startsWith(a, prefix)) |
12 | true; |
13 | false; |
14 | } |
15 | |
16 | ifclass Matches |
17 | sbool startsWithAny(S a, Cl<S> b, Matches m) { |
18 | fOr (S prefix : b) |
19 | if (startsWith(a, prefix, m)) |
20 | true; |
21 | false; |
22 | } |
23 | endif |
Began life as a copy of #1030624
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031331 |
Snippet name: | startsWithAny |
Eternal ID of this version: | #1031331/3 |
Text MD5: | bd95d2155675302f6a110c188c100c14 |
Transpilation MD5: | ce98775ae1eb131671db8fbc9d28af1e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-05 02:37:31 |
Source code size: | 414 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 246 |
Version history: | 2 change(s) |
Referenced in: | [show references] |