Libraryless. Click here for Pure Java version (5189L/29K).
1 | sclass SRTEntry { |
2 | int index; |
3 | double start, end; // seconds |
4 | S text; |
5 | |
6 | bool valid() { |
7 | text = trim(text); |
8 | ret !containsEmptyLines(text); |
9 | } |
10 | |
11 | public S render aka toString() { |
12 | assertTrue(valid()); |
13 | |
14 | ret linesLL( |
15 | index, |
16 | srtFormatTime(start) + " --> " + srtFormatTime(end), |
17 | text); |
18 | } |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033615 |
Snippet name: | SRTEntry - entry in .str subtitles file |
Eternal ID of this version: | #1033615/4 |
Text MD5: | 86dd586384d6517c6999013c7c3f03b1 |
Transpilation MD5: | b3ada6545b54d8176390e93bad25d7b4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-26 00:40:17 |
Source code size: | 348 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 122 / 227 |
Version history: | 3 change(s) |
Referenced in: | [show references] |