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

13
LINES

< > BotCompany Repo | #1002086 // endsWithIgnoreCase

JavaX fragment (include)

1  
static bool endsWithIgnoreCase(S a, S b) {
2  
  int la = l(a), lb = l(b);
3  
  ret la >= lb && regionMatchesIC(a, la-lb, b, 0, lb);
4  
}
5  
6  
ifclass Matches
7  
static bool endsWithIgnoreCase(S a, S b, Matches m) {
8  
  if (!endsWithIgnoreCase(a, b)) false;
9  
  if (m != null)
10  
    m.m = new S[] { substring(a, 0, l(a)-l(b)) };
11  
  true;
12  
}
13  
endif

Author comment

Began life as a copy of #1001499

download  show line numbers  debug dex  old transpilations   

Travelled to 23 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dpqxeycirhfy, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, wnsclhtenguj, xfddqsrefgvo, xrpafgyirdlv

No comments. add comment

Snippet ID: #1002086
Snippet name: endsWithIgnoreCase
Eternal ID of this version: #1002086/7
Text MD5: d0e39f409c00f087f2cb2bae06688e41
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-02-04 09:31:26
Source code size: 333 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 737 / 3807
Version history: 6 change(s)
Referenced in: [show references]