htmltext

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 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

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

FetchMatchedExcerpt returns the matched excerpt according to the words

func FetchRangedExcerpt

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