struct Frame
XuAPI
pub struct Frame {
pub file string
pub line int
pub ok bool
}用途
公开结构体 `Frame`。
参数
filestring- 字段(string)
lineint- 字段(int)
okbool- 字段(bool)
API
#runtimecaller(skip) 仅允许常量 skip 0 或 1。
struct Framepub struct Frame {
pub file string
pub line int
pub ok bool
}公开结构体 `Frame`。
file stringline intok boolcallerpub fn caller(skip int) Framecaller,返回 Frame。
skip intFrame — 该类型的值
map_mix64pub fn map_mix64(value int) intmapmix64。
value intint — 该类型的值
map_hash_intpub fn map_hash_int(key int, seed int) intmap哈希int。
key intseed intint — 该类型的值
map_hash_stringpub fn map_hash_string(key &string, seed int) intmap哈希字符串。
key &stringseed intint — 该类型的值
map_insert_actionpub fn map_insert_action(live int, used int, cap int) intmap插入action。
live intused intcap intint — 该类型的值
starts_withpub fn starts_with(s &string, prefix &string) bool判断是否以给定前缀开头。
s &stringprefix &stringbool — 是否成立
is_digitpub fn is_digit(c int) bool判断是否 digit。
c intbool — 是否成立
is_alphapub fn is_alpha(c int) bool判断是否 alpha。
c intbool — 是否成立
is_alnumpub fn is_alnum(c int) bool判断是否 alnum。
c intbool — 是否成立
is_spacepub fn is_space(c int) bool判断是否 space。
c intbool — 是否成立
itoapub fn itoa(n int) string把 int 转成十进制字符串。
n intstring — 结果字符串
parse_intpub fn parse_int(s &string) int解析为 int。失败时 throw。
s &stringint — 该类型的值
str_bytespub fn str_bytes(s &string) []intstr字节。
s &string[]int — 切片结果
str_runespub fn str_runes(s &string) []intstrrunes。
s &string[]int — 切片结果