sS hAddToHead_fast(S html, S tag) { int idx = indexOfIC(html, "</head>"); if (idx < 0) ret tag + html; ret takeFirst(html, idx) + tag + substring(html, idx); }
Began life as a copy of #1008417
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: | #1024237 |
Snippet name: | hAddToHead_fast - insert tag in <head>, faster version that should also be correct |
Eternal ID of this version: | #1024237/1 |
Text MD5: | 0336cc9402cd826a9b28fce2072349aa |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-28 16:03:27 |
Source code size: | 169 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 213 / 247 |
Referenced in: | [show references] |