Libraryless. Click here for Pure Java version (2509L/16K).
// the problem with this is the lack of a contract-compliant hashCode() sclass CIString implements Comparable<CIString>, CharSequence { S s; // final *() {} *(S *s) { assertNotNull(s); } // note that eq(s, cistring) is still false public boolean equals(Object o) { if (o instanceof CIString) return s.equalsIgnoreCase(((CIString) o).s); if (o instanceof String) // One-way interoperability! return s.equalsIgnoreCase((String) o); return false; } public int compareTo(CIString cis) { ret s.compareToIgnoreCase(cis.s); } public S toString() { ret s; } public S str() { ret s; } public char charAt(int index) { ret s.charAt(index); } public int length() { ret s.length(); } public CharSequence subSequence(int start, int end) { ret CIString(s.substring(start, end)); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment