Libraryless. Click here for Pure Java version (2828L/17K).
// tok = parsed with htmlTok static LS findAllTagsNamed(LS tok, S tag) { new LS out; for (int i = 1; i < l(tok); i += 2) if (isTag(tok.get(i), tag)) out.add(tok.get(i)); ret out; } static LS mapMethodLike findAllTagsNamed(S tag, LS tok) { ret findAllTagsNamed(tok, tag); } // Note the reversed parameters static LS mapMethodLike findAllTagsNamed(S tag, S html) { ret findAllTagsNamed(htmlTok(html), tag); }
Began life as a copy of #1009190
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031454 |
Snippet name: | findAllTagsNamed |
Eternal ID of this version: | #1031454/1 |
Text MD5: | 17d6cec81d47cf1d387c5a70545aab2d |
Transpilation MD5: | 004a5bebe21f9d4f354e835173dd1d4c |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-14 00:25:48 |
Source code size: | 444 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 166 / 229 |
Referenced in: | [show references] |