Libraryless. Click here for Pure Java version (3104L/18K).
/* e.g. [[ 1:23-2:34 1:10:00-1:11:00 ]] */ static L<DoubleRange> parseTimestampRanges(S s) { new L<DoubleRange> l; for (S line : tlft(s)) { int i = indexOf(s, '-'); LS x = trimAll(splitAt_withEmptyLast(line, "-")); if (l(x) != 2) continue with print("parseTimestampRanges unknown line: " + line); l.add(doubleRange( ffmpeg_parseTimestamp(first(x)), ffmpeg_parseTimestamp(second(x)))); } ret l; }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024609 |
Snippet name: | parseTimestampRanges |
Eternal ID of this version: | #1024609/2 |
Text MD5: | 7550dc97a54d3498dddf2e728a243689 |
Transpilation MD5: | c7f197ee9555fb98610b32661e8fbdf0 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-03 23:26:42 |
Source code size: | 446 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 200 / 284 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1024614 - formatTimestampRanges |