Libraryless. Click here for Pure Java version (2651L/17K).
1 | sS safeRegexpReplace_direct(S s, S pat, S replacement) { |
2 | Matcher m = safeRegexp(pat, s); |
3 | new StringBuffer buf; |
4 | while (m.find()) |
5 | m.appendReplacement(buf, replacement); |
6 | m.appendTail(buf); |
7 | ret str(buf); |
8 | } |
Began life as a copy of #1021370
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030197 |
Snippet name: | safeRegexpReplace_direct - with direct replacement |
Eternal ID of this version: | #1030197/1 |
Text MD5: | 41acb88980699a4225653ca6c2142ccd |
Transpilation MD5: | 5359f0eea3eb4dc760ae7ef395e2aa1e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-11-16 10:27:47 |
Source code size: | 222 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 207 / 287 |
Referenced in: | [show references] |