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

11
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
static bool isDollarVar(Symbol s) {
  ret s != null && s.master.dollarVar;
}
endif

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1010853
Snippet name: isDollarVar
Eternal ID of this version: #1010853/4
Text MD5: c9d917e04372293994d5db868ea511d2
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-09 12:29:06
Source code size: 325 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 226 / 277
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1010853 & http://1010853.tinybrain.de