msgutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package msgutil @Author Clover @Data 2024/7/7 下午9:57:00 @Desc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtSomeOne

func AtSomeOne(username string) (atText string)

AtSomeOne 根据昵称返回艾特文本

func ContainsInt

func ContainsInt(slice []int, element int) bool

ContainsInt checks if a slice contains a specific integer

func GetNicknameByAt

func GetNicknameByAt(atcontent string) (nickname string)

GetNicknameByAt 获取艾特消息中的用户名

func HasPrefix

func HasPrefix(s string, prefix string, caseSensitive bool) bool

func IsAtOne added in v0.7.1

func IsAtOne(atText string) bool

func IsCallMe

func IsCallMe(me string, s string) bool

IsCallMe 校验是否呼唤机器人 默认不区分大小写

func IsOrder

func IsOrder(orders []string, content string) (isorder bool, order string)

func TrimCallMe

func TrimCallMe(me string, s string) string

TrimCallMe 去除呼唤机器人的部分 获得剩余部分

func TrimPrefix

func TrimPrefix(s string, prefix string, caseSensitive bool, isTrimSpace bool) string

TrimPrefix caseSensitive 只在匹配的时候忽略大小写(前缀是否对大小写敏感)

Types

This section is empty.

Jump to

Keyboard shortcuts

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