Documentation
¶
Index ¶
- func NewContextReadSeekCloser(ctx context.Context, r io.ReadSeekCloser) io.ReadSeekCloser
- func PrettyTitleCase(name string) string
- func ReadCString(r io.Reader) (string, error)
- func ReadCStringSkipLeadingNulls(r io.Reader) (string, error)
- func Uniq[S ~[]E, E comparable](s S) S
- func UniqFunc[S ~[]E, E any](s S, equal func(E, E) bool) S
- type SectionReadSeeker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextReadSeekCloser ¶ added in v0.3.1
func NewContextReadSeekCloser(ctx context.Context, r io.ReadSeekCloser) io.ReadSeekCloser
func PrettyTitleCase ¶ added in v0.7.23
Returns the (english) string title cased, with minor words (a, an, and, of, on, the, to) lowercased unless they are the first word of the string
func ReadCString ¶ added in v0.7.0
Reads a null-terminated string from r (including null terminator) and returns it as a Go string (without null terminator).
If the reader hits EOF before a null terminator, returns ErrUnexpectedEOF along with the so far read string.
Returns an empty string and error if any other error is encountered.
func ReadCStringSkipLeadingNulls ¶ added in v0.7.37
Like ReadCString, but skips any leading null bytes.
func Uniq ¶ added in v0.7.37
func Uniq[S ~[]E, E comparable](s S) S
Deletes all consecutive duplicate elements, like Unix uniq.
Types ¶
type SectionReadSeeker ¶
type SectionReadSeeker struct {
// contains filtered or unexported fields
}
func NewSectionReadSeeker ¶
func NewSectionReadSeeker(r io.ReadSeeker, off int64, n int64) (*SectionReadSeeker, error)
Click to show internal directories.
Click to hide internal directories.