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

13
LINES

< > BotCompany Repo | #1010853 // isDollarVar

JavaX fragment (include)

static bool isDollarVar(S s) {
  // Possible BREAKING CHANGE (although probably OK): now also accepting $1 etc.
  ret startsWith(s, '$') && l(s) > 1;
  // OLD: ret startsWith(s, '$') && isJavaIdentifierAfter(s, 1);
}

ifclass Symbol
ifdef SymbolWithMasterSymbol
static bool isDollarVar(Symbol s) {
  ret s != null && s.master.dollarVar;
}
endifdef
endif

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

Snippet ID: #1010853
Snippet name: isDollarVar
Eternal ID of this version: #1010853/5
Text MD5: 7bd4c75818af8328f40bd10cfe8e3abb
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-08 03:49:38
Source code size: 365 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 462 / 543
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)