Function: sliceField()
sliceField(
line,slice):string
Extract and trim a FieldSlice from a line (end omitted slices to end of line).
Parameters
line
string
The source line.
slice
The half-open [start, end) slice.
Returns
string
The trimmed field text (empty when the slice is entirely past the line's end).
Example
import { sliceField } from "@cosyte/terminology";
sliceField("00001 A00 1 Cholera", { start: 6, end: 13 }); // => "A00"