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

9
LINES

< > BotCompany Repo | #1013221 // firstTwoDigits

JavaX fragment (include)

static S firstTwoDigits(S s) {
  new StringBuilder buf;
  for (char c : characters(s))
    if (isDigit(c)) {
      buf.append(c);
      if (l(buf) >= 2) break;
    }
  ret str(buf);
}

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: #1013221
Snippet name: firstTwoDigits
Eternal ID of this version: #1013221/2
Text MD5: b9c3b1d732d0ac50de268a23de72a994
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-28 22:48:24
Source code size: 191 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 397 / 417
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1013222 - lastTwoDigits
#1013237 - firstNDigits