pub fn csplit<T>(
options: &CsplitOptions,
patterns: Vec<Pattern>,
input: T
) -> Result<(), CsplitError> where
T: BufRead,
Expand description
Splits a file into severals according to the command line patterns.
Errors
io::Error
if there is some problem reading/writing from/to a file.- [
::CsplitError::LineOutOfRange
] if the line number pattern is larger than the number of input lines. - [
::CsplitError::LineOutOfRangeOnRepetition
], like previous but after applying the pattern more than once. - [
::CsplitError::MatchNotFound
] if no line matched a regular expression. - [
::CsplitError::MatchNotFoundOnRepetition
], like previous but after applying the pattern more than once.