runeKit

package
v3.0.53 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IsLetter 判断是否为(大写||小写)字母?
	/*
		e.g.
			fmt.Println(runeKit.IsLetter('A')) // true
			fmt.Println(runeKit.IsLetter('a')) // true
	*/
	IsLetter func(r rune) bool = unicode.IsLetter

	// IsDigit 判断是否为数字?
	/*
		e.g.
			fmt.Println(runeKit.IsDigit('1')) // true
			fmt.Println(runeKit.IsDigit('0')) // true
			fmt.Println(runeKit.IsDigit('-')) // false
	*/
	IsDigit func(r rune) bool = unicode.IsDigit

	// IsSpace 判断是否为空白符号('\t', '\n', '\v', '\f', '\r', ' ', U+0085 (NEL), U+00A0 (NBSP))?
	/*
		e.g.
			fmt.Println(runeKit.IsSpace(' '))  // true
			fmt.Println(runeKit.IsSpace('\r')) // true
			fmt.Println(runeKit.IsSpace('\n')) // true
			fmt.Println(runeKit.IsSpace('\t')) // true
	*/
	IsSpace func(r rune) bool = unicode.IsSpace
)

Functions

func IsChineseRune

func IsChineseRune(r rune) bool

IsChineseRune 是否为(简体||繁体)中文字符?

e.g.

fmt.Println(runeKit.IsChineseRune('体')) // true
fmt.Println(runeKit.IsChineseRune('體')) // true

Types

This section is empty.

Jump to

Keyboard shortcuts

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