correct

package
v2.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(in string, options ...Option) (out string)

Format auto format string to add spaces between Chinese and English words.

func FormatHTML

func FormatHTML(body string, options ...Option) (out string, err error)

FormatHTML format HTML content

func Unformat

func Unformat(text string, options ...UnformatOption) string

Unformat to remove all spaces

func UnformatHTML

func UnformatHTML(body string, options ...UnformatOption) (out string, err error)

UnformatHTML cleanup spaces for HTML

Types

type Option

type Option interface {
	Format(text string) string
}

type UnformatOption

type UnformatOption interface {
	Unformat(text string) string
}

UnformatOption addition unformat options

Jump to

Keyboard shortcuts

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