Documentation ¶
Index ¶
- func ExtractLines(text string, start, end int) string
- func IsBlank(text string) bool
- func IsNumber(text string) bool
- func LineNumber(text string, sub string) int
- func PrefixLines(text string, prefix string) string
- func Repeat(text string, n int) string
- func SquashBlankLines(text string) string
- func StripHTMLComments(text string) string
- func ToBookTitle(text string) string
- func TrimExtension(path string) string
- func TrimLinePrefix(text string, prefix string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractLines ¶
ExtractLines extract the given lines (1-based indices).
func LineNumber ¶
LineNumber returns the number of the first line containing the subtring or -1 if not found.
func PrefixLines ¶
PrefixLines add a prefix to every line. All lines ends with \n in the result.
func SquashBlankLines ¶
SquashBlankLines replaces successive blank lines by a single empty one.
func StripHTMLComments ¶
StripHTMLComments remove HTML single and multiline comments from a document.
func ToBookTitle ¶
ToBookTitle transform a title to follow common book title conventions (there are many conventions so no one is used in particular)
func TrimExtension ¶
TrimExtension removes the extension from a file name or file path.
func TrimLinePrefix ¶
TrimLinePrefix removes the prefix from every line
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.