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

13
LINES

< > BotCompany Repo | #1002086 // endsWithIgnoreCase

JavaX fragment (include)

static bool endsWithIgnoreCase(S a, S b) {
  int la = l(a), lb = l(b);
  ret la >= lb && regionMatchesIC(a, la-lb, b, 0, lb);
}

ifclass Matches
static bool endsWithIgnoreCase(S a, S b, Matches m) {
  if (!endsWithIgnoreCase(a, b)) false;
  if (m != null)
    m.m = new S[] { substring(a, 0, l(a)-l(b)) };
  true;
}
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: 665 / 3730
Version history: 6 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)