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

5
LINES

< > BotCompany Repo | #1036220 // isPositiveNumberString

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

Transpiled version (9358L) is out of date.

sbool isPositiveNumberString(S s) {
  // detect + sign or non-zero number before decimal point
  // or non-zero number after decimal point
  ret regexpFind("^\\+|^0*[1-9]|^0*\\.0*[1-9]", s);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036220
Snippet name: isPositiveNumberString
Eternal ID of this version: #1036220/5
Text MD5: 80cc3f04fecfb88a75711c7593145cfa
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-31 17:49:59
Source code size: 196 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 141 / 210
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1036224 - dropMinusFromZero