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

10
LINES

< > BotCompany Repo | #1005052 // commonPrefixMulti

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

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

static S commonPrefixMulti(Iterable<S> l) {
  Iterator<S> it = iterator(l);
  if (!it.hasNext()) ret "";
  S s = it.next();
  while ping (it.hasNext()) {
    s = commonPrefix(s, it.next());
    if (empty(s)) break;
  }
  ret s;
}

Author comment

Began life as a copy of #2000589

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1005052
Snippet name: commonPrefixMulti
Eternal ID of this version: #1005052/4
Text MD5: 5b741a3d42ceb25ef95368ff09afddff
Transpilation MD5: 81205569767bb1e3deea8cbe85383571
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-03 10:30:33
Source code size: 240 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 556 / 612
Version history: 3 change(s)
Referenced in: [show references]