tool

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CHINESE_UNICODE_RANGE = []*unicode.RangeTable{
	unicode.Han,
}
View Source
var JAPANESE_UNICODE_RANGE = []*unicode.RangeTable{
	unicode.Hiragana,
}

Functions

func ChunksByte

func ChunksByte(s string, chunkSize int) []string

returns the splited string by the size, chunkSize will be rounded to smallest int divisble by the rune size

func GetSanitizedLanguageCode

func GetSanitizedLanguageCode(s string) string

func GuessLanguageByUnicode

func GuessLanguageByUnicode(title string) string

Guess the language code for a string by looking at the unicode

func StripHtmlTags

func StripHtmlTags(s string) string

Aggressively strips HTML tags from a string. It will only keep anything between `>` and `<`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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