//字符函数--29个 export const StringFunc = [ { "key": "StringSubstring", "name": "StringSubstring", "params": [ { "key": "source", "name": "source", "type": "string" }, { "key": "begin", "name": "begin", "type": "int" }, { "key": "length", "name": "length", "type": "int" } ], "description": `[Function]: Start from the specified position in the string, intercept a string of specified length and return \n[Return value type]: String (String)\n [Example]: StringSubstring("ABCDEFG",2,3) [Return value]: "CDE"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "SubString", "name": "SubString", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "start", "name": "start", "type": "int" }, { "key": "length", "name": "length", "type": "int" } ], "description": `[Function]: Start from the specified position in the string, intercept a string of specified length and return \n[Return value type]: String (String)\n [Example]: SubString("ABCDEFG",2,3) [Return value]: "CDE"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringLength", "name": "取字符串长度", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【功能】:获取指定字符串的长度\n【original】:源字符串\n【Return Type】:数值(System.Int32)\n【Example】:StringLength("语义化表达式")\n【Return】:6`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "Length", "name": "Length", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Get the length of the string \n[Return value type]: Numeric (Int32)\n [Example]: Length("ABCDEF") [Return value]: 6`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "Contains", "name": "Contains", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string contains the target string \n[Return value type]: Boolean (Boolean)\n [Example]: Contains(salesorder.code, "expression") [Return value]: false`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "NotContains", "name": "NotContains", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string not contains the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotContains(salesorder.code, "expression") [Return value]: true`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StartsWith", "name": "StartsWith", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string starts with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: StartsWith(salesorder.code, "expression") [Return value]: false`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "NotStartsWith", "name": "NotStartsWith", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string not starts with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotStartsWith(salesorder.code, "expression") [Return value]: true`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "EndsWith", "name": "EndsWith", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string ends with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: EndsWith(salesorder.code, "expression") [Return value]: false`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "NotEndsWith", "name": "NotEndsWith", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Determine whether the string not ends with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotEndsWith(salesorder.code, "expression") [Return value]: true`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringReplace", "name": "字符串替换", "params": [ { "key": "original", "name": "源字符串", "type": "string" }, { "key": "oldValue", "name": "被替换值", "type": "string" }, { "key": "newValue", "name": "替换值", "type": "string" } ], "description": `【功能】:将源字符串中的"被替换值"替换为"替换值"\n【original】:源字符串\n【oldValue】:被替换值\n【newValue】:替换值\n【Return TypeReturn Type】:字符串(System.String)\n【Example】:StringReplace("123412","12","00")\n【Return】:"003400"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "Replace", "name": "Replace", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "oldValue", "name": "oldValue", "type": "string" }, { "key": "newValue", "name": "newValue", "type": "string" } ], "description": `[Function]: Replace the "replaced value" in the string with "replacement value" \n[Return value type]: String (String)\n [Example]: Replace("123412","12"," 00") [Return value]: "003400"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringToUpper", "name": "转大写", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【Function】:将源字符串转换为大写\n【original】:源字符串\n【Return Type】:字符串(System.String)\n【Example】:StringToUpper("abc")\n【Return】:"ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "ToUpper", "name": "ToUpper", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Convert a string to upper case \n[Return value type]: String (String)\n [Example]: ToUpper("abc") [Return value]: "ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringToLower", "name": "转小写", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【Function】:将源字符串转换为小写\n【original】:源字符串\n【Return TypeReturn Type】:字符串(System.String)\n【Example】:StringToLower("ABC")\n【Return】:"abc"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "ToLower", "name": "ToLower", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Convert a string to lower case \n[Return value type]: String (String)\n [Example]: ToLower("ABC") [Return value]: "abc"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringIndexOf", "name": "获取首个匹配字符串的索引", "params": [ { "key": "original", "name": "源字符串", "type": "string" }, { "key": "target", "name": "目标字符串", "type": "string" } ], "description": `【Function】:在源字符串中,检索目标字符串,找到第一个匹配的字符串后,返回其索引位置(从0开始)。如果未找到目标字符串,则返回-1,如果目标字符串为空串,返回0,如果原字符串为null,则返回-1\n【original】:源字符串\n【target】:目标字符串\n【Return Type】:数值(System.Int32)\n【Example】:StringIndexOf("12001234012","01")\n【Return】:3\n【Example】:StringIndexOf("12002323","34")\n【Return】:-1\n【Example】:StringIndexOf("120011","")\n【Return】:0`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "IndexOf", "name": "IndexOf", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Retrieve the target string in the string, find the first matching string and return the index position (starting from 0). If not found, it returns -1, if the target string is empty, it returns 0, if the original string is null, it returns -1 \n[Return value type]: Number (Int32)\n[Example]: IndexOf("12001234012", "01") [Return value]: 3\n [Example]: IndexOf("12002323", "34") [Return value]: -1\n[ Example]: IndexOf("120011","") [Return value]: 0`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringLastIndexOf", "name": "获取最后一个匹配字符串的索引", "params": [ { "key": "original", "name": "源字符串", "type": "string" }, { "key": "target", "name": "目标字符串", "type": "string" } ], "description": `【功能】:在源字符串中,检索目标字符串,找到最后一个匹配的字符串后,返回其索引位置(从0开始)。如果未找到目标字符串,则返回-1,如果目标字符串为空串,返回0,如果原字符串为null,则返回-1\n【original】:源字符串\n【value】:目标字符串\n【Return Type】:数值(System.Int32)\n【Example】:StringLastIndexOf("12001234012","01")\n【Return】:8\n【Example】:StringLastIndexOf("12002323","34")\n【Return】:-1\n【Example】:StringLastIndexOf("120011","")\n【Return】:0`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastIndexOf", "name": "LastIndexOf", "params": [ { "key": "original", "name": "original", "type": "string" }, { "key": "target", "name": "target", "type": "string" } ], "description": `[Function]: Retrieve the target string in the string, and return the index position (starting from 0) after finding the last matched string. If not found, it returns -1, if the target string is an empty string, it returns the length of the original string, if the original string is null, it returns -1 \n[Return value type]: Number (Int32)\n[Example]: LastIndexOf("12001234012", "01") [Return value]: 8\n [Example]: LastIndexOf("12002323", "34") [Return value]: -1\n [Example]: LastIndexOf("120011", "") [Return value]: 6`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringTrimStart", "name": "删除头部空格", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【功能】:删除源字符串的头部空格\n【original】:源字符串\n【Return Type】:字符串(System.String)\n【Example】:StringTrimStart(" ABC")\n【Return】:"ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "TrimStart", "name": "TrimStart", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Delete the head space of the string and return \n[Return value type]: String (String)\n [Example]: TrimStart("ABC") [Return value]: "ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringTrimEnd", "name": "删除尾部空格", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【功能】:删除源字符串的尾部空格\n【original】:源字符串\n【Return TypeReturn Type】:字符串(System.String)\n【Example】:StringTrimEnd("ABC ")\n【Return】:"ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "TrimEnd", "name": "TrimEnd", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Delete the trailing space of the string and return \n[Return value type]: String (String)\n[Example]: TrimEnd("ABC") [Return value]: "ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringTrim", "name": "删除头尾部空格", "params": [ { "key": "original", "name": "源字符串", "type": "string" } ], "description": `【功能】:删除源字符串的头尾部空格\n【original】:源字符串\n【Return Type】:字符串(System.String)\n【Example】:StringTrim(" ABC ")\n【Return】:"ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "Trim", "name": "Trim", "params": [ { "key": "original", "name": "original", "type": "string" } ], "description": `[Function]: Delete the space at the beginning and end of the string and return \n[Return value type]: String (String)\n [Example]: Trim("ABC") [Return value]: "ABC"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "CreateGuid", "name": "CreateGuid", "params": [], "description": `[Function]: Obtain the unique identifier Guid \n[Return value type]: String (String)\n [Example]: Unique identifier () [Return value]: "7722A793-14DF-49CD-B7E7-DF4987YYD2"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "StringAdd", "name": "字符串相加", "params": [ { "key": "firstStr", "name": "第一个字符串", "type": "string" }, { "key": "secondStr", "name": "第二个字符串", "type": "string" } ], "description": `【Function】:将若干字符串拼接成一个新字符串,最多支持10个字符串拼接,最少2个;编辑器中默认插入两个,多个字符串可手动添加\n【Return Type】:字符串(System.String)\n【Example】:StringAdd("Hello","World")\n【Return】:"HelloWord"`, "type": "String", "keyFront": "DefaultFunction", "className": "" }, { "key": "Add", "name": "Add", "params": [ { "key": "firstStr", "name": "firstStr", "type": "string" }, { "key": "secondStr", "name": "secondStr", "type": "string" } ], "description": `[Function]: Concatenate several strings into a new string, support up to 10 strings and at least 2; two are inserted by default in the editor, and multiple strings can be added manually. \n[Return value type]: string (String)\n[Example]: Add("Hello", "World") [Return value]: "HelloWord"`, "type": "String", "keyFront": "DefaultFunction", "className": "" } ]