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

5
LINES

< > BotCompany Repo | #1036310 // parseHours

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

Libraryless. Click here for Pure Java version (9727L/53K).

static Double parseHours(S s) {
  if (eqic(s, "1 hour")) ret 1.0;
  s = dropSuffixICOrNull_trim(" hours", s);
  ret parseDoubleOpt(s);
}

Author comment

Began life as a copy of #1036309

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036310
Snippet name: parseHours
Eternal ID of this version: #1036310/1
Text MD5: a1e601a3aba660e0db30339e110c6fae
Transpilation MD5: b40b26042a6fac0e496b0466c1684837
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-15 19:09:18
Source code size: 140 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 122 / 170
Referenced in: [show references]