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

12
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;
  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   

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

No comments. add comment

Snippet ID: #1002086
Snippet name: endsWithIgnoreCase
Eternal ID of this version: #1002086/6
Text MD5: 72519e9a780bcbe6b94764bec89395bb
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-13 03:47:13
Source code size: 313 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 430 / 2267
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1002086 & http://1002086.tinybrain.de