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

6
LINES

< > BotCompany Repo | #1009186 // libreOffice_parseMeasure - parse "2.02cm" to 2.02

JavaX fragment (include)

static double libreOffice_parseMeasure(S s) {
  int i = 0;
  while (i < l(s) &&
    (isDigit(s.charAt(i)) || contains("-.", s.charAt(i)))) ++i;
  ret parseDouble(substring(s, 0, i));
}

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: #1009186
Snippet name: libreOffice_parseMeasure - parse "2.02cm" to 2.02
Eternal ID of this version: #1009186/2
Text MD5: db49040b45dcf0f8d4bccf3f829b3f2b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-12 22:11:49
Source code size: 189 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 371 / 404
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)