Appearance
StringUpper
接收一个字符串,返回一个把该字符串中所有小写字母变成大写字母的字符串。
Lua字符串的字节下标是从 1 开始的
业务属性
| 属性 | 含义 | 说明 | 输入限定 | 示例值 |
|---|---|---|---|---|
| enable | 是否启用该控件,未启用时不编译 | 是否编译 | 选择值 | 启用 |
| name | 控件返回值命名 | 控件输出值变量名 | 常量 | upperStr |
| text | 与控件关联的文本 | 设计页控件显示 | 常量 | StringUpper |
| input | 输入字符串 | 常量/流程变量 | #{str} |
使用示例
输入常量
输入:abcedf

输出控件返回upperStr,data属性为:
json
{
"upperStr": "#{upperStr}"
}{
"upperStr": "#{upperStr}"
}
使用curl请求接口:
$ curl http://localhost:6636/api/stringUpper$ curl http://localhost:6636/api/stringUpper接口返回:
json
{
"upperStr": "ABCEDF"
}{
"upperStr": "ABCEDF"
}输入指定变量
输入:#{body.string}

使用curl请求接口:
$ curl http://localhost:6636/api/stringUpper -d "{ \"string\": \"qwerasdf\" }"$ curl http://localhost:6636/api/stringUpper -d "{ \"string\": \"qwerasdf\" }"接口返回:
json
{
"upperStr": "QWERASDF"
}{
"upperStr": "QWERASDF"
}