gb3304

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package gb3304 GB3304-1991 民族代码

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() iter.Seq[*Nation]

All 遍历所有民族信息

func IsValid

func IsValid(v string) bool

IsValid 判断 v 是否是一个有效的民族信息字段

func IsValidAlpha

func IsValidAlpha(v string) bool

func IsValidName

func IsValidName(v string) bool

func IsValidNumeric

func IsValidNumeric(v string) bool

func IsValidRoman

func IsValidRoman(v string) bool

Types

type Nation

type Nation struct {
	Roman   string // 罗马字母
	Alpha   string // 字母表示
	Name    string // 民族名称
	Numeric string // 数字表示
}

Nation 民族信息

func Get

func Get(v string) *Nation

Get 通过 Roman、Alpha、Name、Numeric 等任意字段获取民族信息

func GetByAlpha

func GetByAlpha(v string) *Nation

GetByAlpha 通过字母表示获取民族信息

func GetByName

func GetByName(v string) *Nation

GetByName 通过民族名称获取民族信息

func GetByNumeric

func GetByNumeric(v string) *Nation

GetByNumeric 通过数字表示获取民族信息

func GetByRoman

func GetByRoman(v string) *Nation

GetByRoman 通过罗马字母获取民族信息

Jump to

Keyboard shortcuts

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