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

11
LINES

< > BotCompany Repo | #1021093 // countTokens

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5198L/29K).

static int countTokens(S s) {
  ret l(javaTokC(s));
}

static int countTokens(LS tok) {
  ret l(tok)/2;
}

static int countTokens(IntRange r) {
  ret r == null ? 0 : cncCorrect(r).length()/2;
}

Author comment

Began life as a copy of #1021092

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021093
Snippet name: countTokens
Eternal ID of this version: #1021093/4
Text MD5: 55dce2203aa9721b554d9800d05e87f6
Transpilation MD5: 6f1d4527357861c80ea952c8b33b3064
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-08 01:27:52
Source code size: 203 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 352
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1026610 - moreThanOneToken