static void web_replaceFirstWord(Web web, S word1, S word2) {
for (WebNode node : web_nonRelationNodes(web)) {
S text = node.text();
L<S> words = words2(text);
if (eqic(first(words), word1)) {
words.set(0, word2);
web_setText(node, joinWithSpaces(words));
}
}
}Began life as a copy of #1010124
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: | #1010125 |
| Snippet name: | web_replaceFirstWord |
| Eternal ID of this version: | #1010125/1 |
| Text MD5: | bba411ac4997894e982163c5e3c9f56f |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-09-03 23:29:10 |
| Source code size: | 302 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 885 / 857 |
| Referenced in: | [show references] |