htmltext

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearText

func ClearText(html string) (text string)

ClearText clear HTML, get the clear text

func FetchExcerpt

func FetchExcerpt(html, trimMarker string, limit int) (text string)

FetchExcerpt return the excerpt from the HTML string

func FetchMatchedExcerpt added in v1.3.0

func FetchMatchedExcerpt(html string, words []string, trimMarker string, trimLength int) string

FetchMatchedExcerpt returns the matched excerpt according to the words

func FetchRangedExcerpt added in v1.3.0

func FetchRangedExcerpt(html, trimMarker string, offset int, limit int) (text string)

FetchRangedExcerpt returns a ranged excerpt from the HTML string. Note: offset is a rune index, not a byte index

func GetPicByUrl

func GetPicByUrl(Url string) string

func UrlTitle

func UrlTitle(title string) (text string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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