1 | sS escapeUpperCaseWithUnderscore(S s) { |
2 | new StringBuilder buf; |
3 | for i over s: { |
4 | char c = s.charAt(i); |
5 | if (isUpperCase(c)) buf.append('_'); |
6 | buf.append(c); |
7 | } |
8 | ret str(buf); |
9 | } |
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: | #1015102 |
Snippet name: | escapeUpperCaseWithUnderscore |
Eternal ID of this version: | #1015102/1 |
Text MD5: | bcdf0f1d1516c73ddb84d973e99541b1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-08 13:06:46 |
Source code size: | 198 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 433 / 455 |
Referenced in: | [show references] |