Libraryless. Click here for Pure Java version (3100L/17K).
static L<S> isYes_yesses = litlist("y", "yes", "yeah", "y", "yup", "yo", "corect", "sure", "ok", "afirmative"); // << collapsed words, so "corect" means "correct" static boolean isYes(S s) { ret isYes_yesses.contains(collapseWord(toLowerCase(firstWord2(s)))); }
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: | #1002563 |
| Snippet name: | isYes |
| Eternal ID of this version: | #1002563/5 |
| Text MD5: | 202b32e6ea7f288e1219fa3f545e65c9 |
| Transpilation MD5: | 1c961f8a1e0d29945863d2e5af87eb71 |
| Author: | stefan |
| Category: | eleu |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-09 19:33:41 |
| Source code size: | 268 bytes / 5 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 990 / 1097 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |