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

6
LINES

< > BotCompany Repo | #1012953 // scoredSearch_score_single

JavaX fragment (include)

1  
static int scoredSearch_score_single(S s, S query) {
2  
  int i = indexOfIC_underscore(s, query);
3  
  if (i < 0) ret 0;
4  
  if (i > 0) ret 1;
5  
  ret l(s) == l(query) ? 3 : 2;
6  
}

Author comment

Began life as a copy of #1011593

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: #1012953
Snippet name: scoredSearch_score_single
Eternal ID of this version: #1012953/3
Text MD5: b1f83d9f41d96b73fc40357565d9d050
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-22 17:00:53
Source code size: 173 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 436
Version history: 2 change(s)
Referenced in: [show references]