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

10
LINES

< > BotCompany Repo | #1028015 // commonSuffixMulti

JavaX fragment (include)

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

Author comment

Began life as a copy of #1005052

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: #1028015
Snippet name: commonSuffixMulti
Eternal ID of this version: #1028015/1
Text MD5: e8982f7f72ccecaf9487ac9dd57caa1c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-03 18:26:23
Source code size: 234 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 165 / 203
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)