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

14
LINES

< > BotCompany Repo | #1017669 // UniqueString - string that can be compared with ==

JavaX fragment (include)

sclass UniqueString implements CharSequence {
  S s;
  
  private *() {}
  *(S *s, bool dummy) {} // avoid accidental calling
  
  toString { 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 uniqueString(s.substring(start, end));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017669
Snippet name: UniqueString - string that can be compared with ==
Eternal ID of this version: #1017669/2
Text MD5: 9058a221e0026a196a6a25faacbb0bf0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-31 23:00:50
Source code size: 374 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 248 / 808
Version history: 1 change(s)
Referenced in: [show references]