CODEARTS API-Mock语法说明:Helper
Helper
分类 |
规则 |
示例 |
示例结果 |
---|---|---|---|
全大写 |
@upper(str) |
@upper("hello") |
"HELLO" |
全小写 |
@lower(str) |
@lower("HELLO") |
"hello" |
多选一 |
@pick(arr) |
@pick(["hello", "test", "test3"]) |
"hello" |
@pick([1, 5, 10, 60, 80]) |
10 |
||
@pick([1,"hello","中国",true,80]) |
true |