1 | static S getTag(S s) { |
2 | if (!startsWith(s, "<")) null; |
3 | int i = 1; |
4 | if (charAt(s, i) == '/') ++i; |
5 | while (" \t>/\0".indexOf(charAt(s, i)) < 0) ++i; |
6 | ret substring(s, 1, i); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003992 |
Snippet name: | getTag - get tag name of XML/HTML tag |
Eternal ID of this version: | #1003992/5 |
Text MD5: | df7b54f0cf460bfba02c189513ad4d52 |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-07-12 13:18:37 |
Source code size: | 185 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 541 / 553 |
Version history: | 4 change(s) |
Referenced in: | [show references] |