1 | static S transferCase(S a, S b) {
|
2 | if (startsWithUpperCase(a) && !isAllUpperCase(a)) ret firstToUpper(b); |
3 | if (startsWithLowerCase(a) && !isAllLowerCase(a)) ret firstToLower(b); |
4 | if (isAllLowerCase(a)) ret lower(b); |
5 | if (isAllUpperCase(a)) ret upper(b); |
6 | ret b; |
7 | } |
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: | #1014543 |
| Snippet name: | transferCase - make an effort to transfer case between strings |
| Eternal ID of this version: | #1014543/1 |
| Text MD5: | 7772527a71a155f33800c82eb387d54b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-23 19:49:19 |
| Source code size: | 274 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 589 / 636 |
| Referenced in: | [show references] |