string

    返回值类型:String

    截取字符串

    • 从中提取happy
    • smiles中提取mile
    1. ${string.substring('smiles',1,5)}

    lower

    参数名描述可否为空
    content要转小写的字符串

    TIP

    返回值类型:String

    字符串转小写

    • hello变成小写hello
    1. ${string.lower('HELLO')}

    upper

    参数名描述可否为空
    content要转大写的字符串

    TIP

    返回值类型:String

    字符串转大写

    • hello变成大写HELLO

    indexOf

    参数名描述可否为空
    content被查找的字符串
    str要查找的字符串
    fromIndex起始位置

    TIP

    返回值类型:int

    获取字符串在被查找字符串中的位置

    • worldhello world中的位置
    1. ${string.indexOf('hello world','world')}

    replace

    TIP

    替换字符串

    • Hello,World!替换成Hello,SpiderFlow!
    参数名描述可否为空
    content被替换的字符串
    regx正则表达式
    target替换字符串

    TIP

    返回值类型:String

    正则替换字符串

    • h1e2l3l4o5替换成hello
    1. ${string.replaceAll('h1e2l3l4o5','\\d+','')}

    replaceFirst

    参数名描述可否为空
    content被替换的字符串
    regx正则表达式
    target替换字符串

    TIP

    返回值类型:String

    正则替换第一个字符串

    1. ${string.replaceFirst('h1e2l3l4o5','\\d+','')}

    length

    参数名描述可否为空
    content要获取长度的字符串

    TIP

    返回值类型:int

    获取字符串的长度

    • 获取hello的长度
    1. ${string.length('hello')}

    trim

    TIP

    返回值类型:String

    split

    参数名描述可否为空
    content被替换的字符串
    regx正则表达式

    TIP

    返回值类型:String

    正则分割字符串

    • h1e2l3l4o5替换成['h','e','l','l','o']
    1. ${string.split('h1e2l3l4o5','\\d+')}
    参数名描述可否为空
    content被替换的字符串
    charset编码格式

    TIP

    返回值类型:byte[]

    获取字符串的字节数组

    • 获取字符串hello的字节数组

    newString

    参数名描述可否为空
    byte[]字节数组
    charset编码格式

    TIP

    返回值类型:String

    • 把字节数组转为String
    1. ${string.newString(resp.bytes)}

    equals

    TIP

    返回值类型:String

    • 判断两个字符串是否相同
    1. ${string.equals(resp.html,'hello,world')}

    uuid

    TIP

    返回值类型:String

    • 获取一个UUID字符串

    uuids

    参数名描述可否为空
    size要获取uuid的数量

    返回值类型:List<String>

    • 获取10个uuid