static S multiReplace(S s, S... replacements) { if (s == null) null; for (int i = 0; i+1 < l(replacements); i += 2) s = s.replace(replacements[i], replacements[i+1]); ret 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: | #1006858 |
Snippet name: | multiReplace - apply multiple string replaces |
Eternal ID of this version: | #1006858/1 |
Text MD5: | fa9ce4d847b7b993695bcfdeb2b5e58d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-10 19:44:10 |
Source code size: | 190 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 540 / 562 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1006859 - repeatMultiReplace - repeat multiReplace until result is stable #1006860 - repeatMultiReplace2 - repeatMultiReplace in different order (string by string) |