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

7
LINES

< > BotCompany Repo | #1027464 // regexpLiteralNeedsQuoting

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2199L/14K).

sbool regexpLiteralNeedsQuoting(S s) {
  int n = l(s);
  for i to n:
    if (regexpSpecialCharacters().indexOf(s.charAt(i)) >= 0)
      true;
  false;
}

Author comment

Began life as a copy of #1027463

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027464
Snippet name: regexpLiteralNeedsQuoting
Eternal ID of this version: #1027464/1
Text MD5: 6458787f43f6beb91da01b3e756ffa1b
Transpilation MD5: 77090f2241b8d3ec86ccd6490e76065b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-22 13:14:44
Source code size: 158 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 106 / 169
Referenced in: [show references]