Zhamao Framework  3.0.0-beta1
A high-performance chatbot + web framework
CatCode类 参考

静态 Public 成员函数

static fromSegment (mixed $message_segment)
 
static encode (\Stringable|int|string $msg, bool $is_content=false)
 
static decode (\Stringable|int|string $msg, bool $is_content=false)
 

成员函数说明

◆ decode()

static decode ( \Stringable|int|string  $msg,
bool  $is_content = false 
)
static

反转义字符串中的CatCode敏感符号

参数
int | string | \Stringable$msg字符串
bool$is_content如果是解码CatCode本体内容,则为false(默认),如果是参数内的字符串,则为true
返回
string 转义后的CatCode

◆ encode()

static encode ( \Stringable|int|string  $msg,
bool  $is_content = false 
)
static

转义CatCode的特殊字符

参数
int | string | \Stringable$msg字符串
bool$is_content如果是转义CatCode本体内容,则为false(默认),如果是参数内的字符串,则为true
返回
string 转义后的CatCode

◆ fromSegment()

static fromSegment ( mixed  $message_segment)
static

从 MessageSegment 转换为 CatCode 字符串


该类的文档由以下文件生成: