util

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmpty = errors.New("empty")

Functions

func Chars

func Chars(s string, end int) string

func InnerText added in v1.6.0

func InnerText(html, expr string) (text string, err error)

func InnerTextOrEmpty added in v1.15.0

func InnerTextOrEmpty(parent *html.Node, expr string) string

func InnerTexts added in v1.14.0

func InnerTexts(html, expr string) (texts []string, err error)

func JoinStrings added in v1.15.0

func JoinStrings(texts []string) string

func NormalizeSpace added in v1.6.0

func NormalizeSpace(s string) string

func ParseNumberFloat64 added in v1.1.1

func ParseNumberFloat64(s string) (number float64, result bool)

func ParseNumberInt64 added in v1.1.1

func ParseNumberInt64(s string) (number int64, result bool)

func ReadFile

func ReadFile(file string) (text string)

func SelectAttrs added in v1.11.2

func SelectAttrs(html, expr, attr string) (texts []string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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