huldra

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: BSD-3-Clause Imports: 2 Imported by: 1

README

huldra

Go package for detecting HTML and for inserting strings and bytes into HTML.

IsHTML(byteslice) -> bool and IsHTMLString(string) -> bool can be used for checking if the given data or string looks like HTML.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTMLTag

func GetHTMLTag(data []byte, maxpos uint64) ([]byte, error)

func GetHTMLTagString

func GetHTMLTagString(s string, maxpos uint64) (string, error)

func HTMLIndex

func HTMLIndex(data []byte, maxpos uint64) (uint64, error)

func HTMLIndexString

func HTMLIndexString(s string, maxpos uint64) (uint64, error)

func HasHTMLTag

func HasHTMLTag(data []byte, maxpos uint64) bool

HasHTMLTag checks if the literal <html[...]> tag exists in the given data, within the given max character position.

func HasHTMLTagString

func HasHTMLTagString(s string, maxpos uint64) bool

func HasScriptTag

func HasScriptTag(data []byte, maxpos uint64) bool

HasScriptTag checks if the literal <script> tag exists in the given data, within the given max character position.

func HasScriptTagString

func HasScriptTagString(s string, maxpos uint64) bool

HasScriptTagString checks if the literal <script> tag exists in the given string, within the given max rune position.

func IsHTML

func IsHTML(data []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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