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

10
LINES

< > BotCompany Repo | #1008447 // isMinusIdentifier

JavaX fragment (include)

1  
static boolean isMinusIdentifier(S s) {
2  
  if (empty(s)) false;
3  
  if (!Character.isJavaIdentifierStart(s.charAt(0))
4  
    && !s.startsWith("-"))
5  
    false;
6  
  for (int i = 1; i < s.length(); i++)
7  
    if (!Character.isJavaIdentifierPart(s.charAt(i)) && s.charAt(i) != '-')
8  
      false;
9  
  true;
10  
}

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: 559 / 614
Referenced in: [show references]