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

9
LINES

< > BotCompany Repo | #1024083 // isRepeatedChar

JavaX fragment (include)

1  
sbool isRepeatedChar(S s) {
2  
  if (empty(s)) false;
3  
  char c = first(s);
4  
  int n = l(s);
5  
  for (int i = 1; i < l(s); i++)
6  
    if (s.charAt(i) != c)
7  
      false;
8  
  true;
9  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024083
Snippet name: isRepeatedChar
Eternal ID of this version: #1024083/1
Text MD5: 2a04fd9075d03239ca3a1dd61e49cd97
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-20 14:43:31
Source code size: 177 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 109 / 153
Referenced in: [show references]