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


< > BotCompany Repo | #1001520 // eqic (short for equalsIgnoreCase)

JavaX fragment (include)

static bool eqic(S a, S b) {
  ifdef eqic_lower
    ret compareIgnoreCase_lower(a, b) != 0;
  ifndef eqic_lower
    if ((a == null) != (b == null)) ret false;
    if (a == null) ret true;
    ret a.equalsIgnoreCase(b);

ifclass Symbol
static bool eqic(Symbol a, Symbol b) {
  ret eq(a, b);

static bool eqic(Symbol a, S b) {
  ret eqic(asString(a), b);

static bool eqic(char a, char b) {
  if (a == b) true;
  ifndef eqic_lower
    char u1 = Character.toUpperCase(a);
    char u2 = Character.toUpperCase(b);
    if (u1 == u2) true;
  ret Character.toLowerCase(u1) == Character.toLowerCase(u2);

download  show line numbers  debug dex  old transpilations   

Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, thuhawujahgc, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001520
Snippet name: eqic (short for equalsIgnoreCase)
Eternal ID of this version: #1001520/6
Text MD5: f29338557bb7cb79905ed54c9e952316
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-31 07:31:36
Source code size: 672 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 922 / 4840
Version history: 5 change(s)
Referenced in: [show references]