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

10
LINES

< > BotCompany Repo | #1008447 // isMinusIdentifier

JavaX fragment (include)

static boolean isMinusIdentifier(S s) {
  if (empty(s)) false;
  if (!Character.isJavaIdentifierStart(s.charAt(0))
    && !s.startsWith("-"))
    false;
  for (int i = 1; i < s.length(); i++)
    if (!Character.isJavaIdentifierPart(s.charAt(i)) && s.charAt(i) != '-')
      false;
  true;
}

Author comment

Began life as a copy of #1001138

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: #1008447
Snippet name: isMinusIdentifier
Eternal ID of this version: #1008447/1
Text MD5: f1eebca3e2db738d0705d5901f950ab1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-15 19:11:23
Source code size: 299 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 483 / 529
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)