getHours(timestamp: timestamp): int | 核心 | 获取小时 |
getMinutes(timestamp: timestamp): int | 核心 | 获取分钟 |
getSeconds(timestamp: timestamp): int | 核心 | 获取秒 |
getMilliseconds(value: timestamp|duration): int | 核心 | 获取毫秒 |
has(field: message.field|map.key): bool | 宏 | 检查字段/键是否存在 |
all(iterable: list|map, predicate: function): bool | 宏 | 检查所有元素满足谓词 |
exists(iterable: list|map, predicate: function): bool | 宏 | 检查存在元素满足谓词 |
exists_one(iterable: list|map, predicate: function): bool | 宏 | 检查恰好一个元素满足谓词 |
map(iterable: list|map, transform: function): T | 宏 | 映射转换元素 |
map(iterable: list|map, predicate: function, transform: function): T | 宏 | 条件映射转换 |
filter(iterable: list|map, predicate: function): T | 宏 | 过滤元素 |
charAt(str: string, index: int): string | Strings | 获取指定位置字符 |
indexOf(str: string, substr: string): int | Strings | 查找子串首次出现位置 |
lastIndexOf(str: string, substr: string): int | Strings | 查找子串最后出现位置 |
lowerAscii(str: string): string | Strings | 转小写 (ASCII) |
upperAscii(str: string): string | Strings | 转大写 (ASCII) |
replace(str: string, old: string, new: string): string | Strings | 替换子串 |
split(str: string, sep: string): list<string> | Strings | 分割字符串 |
substring(str: string, start: int, end?: int): string | Strings | 截取子串 |
trim(str: string): string | Strings | 去除首尾空白 |
join(strings: list<string>, sep?: string): string | Strings | 连接字符串列表 |
reverse(str: string): string | Strings | 反转字符串 |
format(template: string, args: list): string | Strings | 格式化字符串 |
quote(str: string): string | Strings | 引用字符串 |
slice(list: list, start: int, end: int): list | Lists | 切片 |
flatten(list: list, depth?: int): list | Lists | 展平嵌套列表 |
distinct(list: list): list | Lists | 去重 |
range(count: int): list<int> | Lists | 生成整数列表 |
reverse(list: list): list | Lists | 反转列表 |
sort(list: list): list | Lists | 排序 |
greatest(...values: number): number | Math | 最大值 |
least(...values: number): number | Math | 最小值 |
abs(value: number): number | Math | 绝对值 |
sign(value: number): int | Math | 符号 |
ceil(value: double): double | Math | 向上取整 |
floor(value: double): double | Math | 向下取整 |
round(value: double): double | Math | 四舍五入 |
trunc(value: double): double | Math | 截断 |
sqrt(value: double): double | Math | 平方根 |
isInf(value: double): bool | Math | 检查无穷大 |
isNaN(value: double): bool | Math | 检查非数字 |
isFinite(value: double): bool | Math | 检查有限数 |
bitOr(left: int, right: int): int | Math | 位或 |
bitAnd(left: int, right: int): int | Math | 位与 |
bitXor(left: int, right: int): int | Math | 位异或 |
bitNot(value: int): int | Math | 位非 |
bitShiftLeft(value: int, shift: int): int | Math | 左移位 |
bitShiftRight(value: int, shift: int): int | Math | 右移位 |
encode(data: bytes): string | Encoders | Base64 编码 |
decode(data: string): bytes | Encoders | Base64 解码 |
contains(left: list, right: list): bool | Sets | 检查包含关系 |
equivalent(left: list, right: list): bool | Sets | 检查集合等价 |
intersects(left: list, right: list): bool | Sets | 检查交集 |
replace(target: string, pattern: string, replacement: string, count?: int): string | Regex | 正则替换 |
extract(target: string, pattern: string): string | Regex | 正则提取首次匹配 |
getExt(msg: message, extension: string): any | Protos | 获取扩展字段 |
hasExt(msg: message, extension: string): bool | Protos | 检查扩展字段存在 |
bind(varName: string, initExpr: any, resultExpr: any): any | Bindings | 绑定局部变量 |
all(...) | TwoVarComprehensions | 测试宏 |
exists(...) | TwoVarComprehensions | 测试宏 |
existsOne(...) | TwoVarComprehensions | 测试宏 |
transformList(...) | TwoVarComprehensions | 转换宏 |
transformMap(...) | TwoVarComprehensions | 转换宏 |
transformMapEntry(...) | TwoVarComprehensions | 转换宏 |
string(value: any): string | 类型转换 | 转字符串 |
timestamp(value: string): timestamp | 类型转换 | 转时间戳 |
type(value: any): string | 类型转换 | 获取类型 |
uint(value: number|string): uint | 类型转换 | 转无符号整数 |