This function reads a text file and splits it into chunks where each chunk contains a specified number of chapters. Chapters are identified by markers like "第.*章".

cut_txt(file, marker = "第.*章", num_chapters = 25)

Arguments

file

The path to the text file to be cut.

marker

The regular expression pattern to identify chapters in the text file.

num_chapters

The number of chapters to include in each chunk. Default is 25.

Value

NULL (The function writes output files.)

Examples

if (FALSE) { # \dontrun{
cut_txt(file = "your_file.txt", marker = "第.*章", num_chapters = 25)
} # }