1 | static S camelCase(L<S> words) { |
2 | new StringBuilder buf; |
3 | for i over words: { |
4 | S word = words.get(i); |
5 | word = toLower(word); |
6 | buf.append(i == 0 ? word : firstToUpper(word)); |
7 | } |
8 | ret str(buf); |
9 | } |
10 | |
11 | static S camelCase(S words) { |
12 | ret camelCase(words(words)); |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005764 |
Snippet name: | camelCase - convert word list into "camel case" |
Eternal ID of this version: | #1005764/2 |
Text MD5: | d62650616d846f100af21504c074dd89 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-24 16:17:11 |
Source code size: | 282 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 553 / 567 |
Version history: | 1 change(s) |
Referenced in: | [show references] |