Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1028145 // condenseToUpperCaseLetters

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2486L/16K).

sS condenseToUpperCaseLetters(S s) {
  new StringBuilder buf;
  int n = l(s);
  char c;
  for i to n:
    if (isLetter(c = s.charAt(i)))
      buf.append(upper(c));
  ret str(buf);
}

Author comment

Began life as a copy of #1017560

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028145
Snippet name: condenseToUpperCaseLetters
Eternal ID of this version: #1028145/3
Text MD5: 97dbf3f3b32691f9027ab9d2e3b85056
Transpilation MD5: a2069852d49eab9f16af751d26276f1f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-23 14:49:55
Source code size: 190 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 111 / 189
Version history: 2 change(s)
Referenced in: [show references]