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

6
LINES

< > BotCompany Repo | #1016774 // ai_dropCommonSuffixListCI_ifNonTrivial

JavaX fragment (include)

1  
static Pair<L<S>> ai_dropCommonSuffixListCI_ifNonTrivial(Pair<L<S>> p) {
2  
  if (p == null) null;
3  
  int n = l(commonSuffixListCI(p.a, p.b));
4  
  if (n == 0 || n == l(p.a) || n == l(p.b)) null;
5  
  ret pair(dropLast(n, p.a), dropLast(n, p.b));
6  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016774
Snippet name: ai_dropCommonSuffixListCI_ifNonTrivial
Eternal ID of this version: #1016774/6
Text MD5: ffa61ef8d9c785c8fdca5482ee2b5f07
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-02 13:11:10
Source code size: 243 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 431 / 455
Version history: 5 change(s)
Referenced in: [show references]