(detail: string | undefined)
| 144 | |
| 145 | /** The detail of the entry a repeat count stands for; an ordinary detail as it is. */ |
| 146 | export function countedDetail(detail: string | undefined): string | undefined { |
| 147 | if (repeatCount(detail) === undefined) return detail; |
| 148 | const newline = detail!.indexOf('\n'); |
| 149 | return newline < 0 ? undefined : detail!.slice(newline + 1); |
| 150 | } |
| 151 | |
| 152 | /** Cut a text field at the shared cap and say so. */ |
| 153 | export function capField(text: string, max = UI_LOG_FIELD_MAX): string { |
no test coverage detected