1 | static boolean isJavaIdentifier(S s) { |
2 | if (empty(s) || !Character.isJavaIdentifierStart(s.charAt(0))) |
3 | return false; |
4 | for (int i = 1; i < s.length(); i++) |
5 | if (!Character.isJavaIdentifierPart(s.charAt(i))) |
6 | return false; |
7 | return true; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001138 |
Snippet name: | isJavaIdentifier |
Eternal ID of this version: | #1001138/2 |
Text MD5: | 8f9d58b39fd53a76474c061ef9445200 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-29 15:51:27 |
Source code size: | 258 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 689 / 8114 |
Version history: | 1 change(s) |
Referenced in: | [show references] |