hugo: github.com/gohugoio/hugo/common/text Index | Files

package text

import "github.com/gohugoio/hugo/common/text"

Index

Package Files

position.go transform.go

func RemoveAccents Uses

func RemoveAccents(b []byte) []byte

RemoveAccents removes all accents from b.

func RemoveAccentsString Uses

func RemoveAccentsString(s string) string

RemoveAccentsString removes all accents from s.

type Position Uses

type Position struct {
    Filename     string // filename, if any
    Offset       int    // byte offset, starting at 0. It's set to -1 if not provided.
    LineNumber   int    // line number, starting at 1
    ColumnNumber int    // column number, starting at 1 (character count per line)
}

Position holds a source position in a text file or stream.

func (Position) IsValid Uses

func (pos Position) IsValid() bool

IsValid returns true if line number is > 0.

func (Position) String Uses

func (pos Position) String() string

type Positioner Uses

type Positioner interface {
    Position() Position
}

Positioner represents a thing that knows its position in a text file or stream, typically an error.

Package text imports 9 packages (graph) and is imported by 20 packages. Updated 2020-01-06. Refresh now. Tools for package owners.