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

11
LINES

< > BotCompany Repo | #1011284 // replaceFirstLong - replace first long in string

JavaX fragment (include)

static S replaceFirstLong(S s, long l) {
  ret replaceFirstLong(s, str(l));
}

static S replaceFirstLong(S s, S replacement) {
  L<S> tok = javaTok(s);
  int i = jfind(tok, "<int>");
  if (i < 0) ret s;
  tok.set(i, replacement);
  ret join(tok);
}

Author comment

Began life as a copy of #1005548

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011284
Snippet name: replaceFirstLong - replace first long in string
Eternal ID of this version: #1011284/5
Text MD5: 95a15e36b72014831c443c3c84c1fae9
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-23 19:26:15
Source code size: 258 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 436 / 446
Version history: 4 change(s)
Referenced in: [show references]