util

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillAnswerResponse

func FillAnswerResponse(answers [][]string, req *model.SearchRequest) model.SearchResponse

FillAnswerResponse 根据搜题结果填充答案

func FormatOptions

func FormatOptions(options []string, questionType uint) []string

FormatOptions 格式化选项

func FormatString

func FormatString(src string) string

FormatString 格式化字符串

func FullWidthStrToHalfWidthStr

func FullWidthStrToHalfWidthStr(str string) (result string)

FullWidthStrToHalfWidthStr 全角转半角

func GetQuestionText

func GetQuestionText(q string) string

GetQuestionText 保留汉字、数字和字母,移除其他字符

func IsAlpha

func IsAlpha(s string) bool

IsAlpha 判断字符串是否全是大写字母

func IsFalse

func IsFalse(s string) bool

IsFalse 判断字符串是否是错误

func IsTrue

func IsTrue(s string) bool

IsTrue 判断字符串是否是正确

func SearchRightAnswer

func SearchRightAnswer(answers [][]string) []string

SearchRightAnswer 此方法还有巨大的优化空间

Types

This section is empty.

Jump to

Keyboard shortcuts

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