text

package module
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsText

func IsText(b []byte, extraChars []rune) bool

IsText returns true if bytes in b form valid UTF-8 characters, and if b doesn't contain any unprintable ASCII or Unicode characters.

Types

type Scanner

type Scanner interface {
	Scan() bool
	Text() string
	Err() error
}

func MultiScanner

func MultiScanner(scanners ...Scanner) Scanner

type SectionScanner

type SectionScanner struct {
	Scanner

	NumSepLines int
	// contains filtered or unexported fields
}

func NewSectionScanner

func NewSectionScanner(s Scanner) *SectionScanner

Create a Scanner that reads lines up to the first empty line, which is skipped.

func (*SectionScanner) Scan

func (s *SectionScanner) Scan() (ok bool)

func (*SectionScanner) Text

func (s *SectionScanner) Text() string

type Writer

type Writer interface {
	io.Writer
	Printf(format string, arg ...interface{}) (n int, err error)
	Println(arg ...interface{}) (n int, err error)
	PrintSlice([]string) (n int, err error)
}

Directories

Path Synopsis
Package rc implements string handling that mimics the style of the Rc shell.
Package rc implements string handling that mimics the style of the Rc shell.
Package stringutil contains utility functions working on string arguments.
Package stringutil contains utility functions working on string arguments.
A parser for tab indented trees of structured data.
A parser for tab indented trees of structured data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL