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

9
LINES

< > BotCompany Repo | #1024083 // isRepeatedChar

JavaX fragment (include)

sbool isRepeatedChar(S s) {
  if (empty(s)) false;
  char c = first(s);
  int n = l(s);
  for (int i = 1; i < l(s); i++)
    if (s.charAt(i) != c)
      false;
  true;
}

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: 166 / 211
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)