PowerAutomateexpression中的string相关公式
PowerAutomateexpression中的string相关公式
Power Automate 现阶段还不能使⽤上Power Fx,所以我们可以使⽤
string中的常⽤的⼀些function如下:
ps: 如有问号则为optional选项
Combine two or more strings, and return the combined string
Concat可以把2个/2个以上的string结合到⼀起,并且返回⼀个结合之后的string
Function: concat('<text1>', '<text2>', ...)
Example: concat('Hello', 'World')
Output: Hello World
Check whether a string ends with a specific substring. Return true when the substring is found, or return false when not found. This function is not case-sensitive.
检查你的string是否是以特定的有个substring做结尾。返回值为bool(true/false)如果到结束为substring则返回true,未到substring则返回false。这个⽅法不是⼤⼩写敏感。
Function: endsWith('<text>', '<searchText>')
Example: endsWith('hello world', 'world')好听又难忘的网名
以感恩为话题作文Output: true
Return a number as a string that's based on the specified format.
基于特定的格式将⼀个number返回⼀个string
Function: formatNumber(<number>, <format>, <locale>?)
Example:
formatNumber(1234567890, '0,0.00', 'en-us')
formatNumber(17.35, 'C2')
Output:
sign是什么意思1,234,567,890.00
$17.35
Generate a globally unique identifier (GUID) as a string, for example, "c2ecc88d-88c8-4096-912c-d6f2e2b138ce":
⽣成⼀个 string类型的GUID
Function:
guid()
guid('<format>')  ps: GUID的各代表什么
Example: guid('P')
Output: "(c2ecc88d-88c8-4096-912c-d6f2e2b138ce)"
Return the starting position or index value for a substring. This function is not case-sensitive, and indexes start with the number 0.
一斤等于多少千克
返回substring在string中的index 值。这个function不是⼤⼩写敏感功能,index 开始数为0
Function: indexOf('<text>', '<searchText>')
情人节歌词
Return the starting position or index value for the last occurrence of a substring. This function is not case-sensitive, and indexes start with the number 0.
返回开始位置或者在string中出现的substring的index值。⾮⼤⼩写敏感,index开始值为0
Function: lastIndexOf('<text>', '<searchText>')
如果text 值是空,则返回-1
如果text和searchText两者皆为空,则返回0
如果searchText是空,则text的总长度减1
Example:
lastIndexOf('hello world hello world', 'world')
lastIndexOf('hello world hello world', '')
Output:
18
22
Return the number of items in a collection.
返回在⼀个string中所有字节总和
华西村人均收入Function: length('<collection>')
Example: length('abcd')
Output: 4
Replace a substring with the specified string, and return the result string. This function is case-sensitive.
在string中把⼀部分旧字段⽤新字段代替掉。⼤⼩写敏感功能
Function: replace('<text>', '<oldText>', '<newText>')
Example: replace('the old string', 'old', 'new')
Output: the new string
Return an array that contains substrings, separated by commas, based on the specified delimiter character in the original string.
把string中的所有字段按照指定的⽅式分割开,并且输出为array
Function: split('<text>', '<delimiter>')
Example: split('a_b_c', '_')
Output: ["a","b","c"]
Check whether a string starts with a specific substring. Return true when the substring is found, or return false when not found. This function is not case-sensitive.
检查string中是否以substring作为开始,返回值为bool(true/false), ⾮⼤⼩写敏感
Function: startsWith('<text>', '<searchText>')
Return characters from a string, starting from the specified position, or index. Index values start with the number 0.
从string中,按照指定的index和长度返回相应的字段。  index值从0开始
Function: substring('<text>', <startIndex>, <length>)
Example: substring('hello world', 6, 5)
Output: world
Return a string in lowercase format. If a character in the string doesn't have a lowercase version, that character stays unchanged in the returned string.
把string中的所有字符改为⼩写
Function: toLower('<text>')
Example: toLower('Hello World')
Output: hello world
Return a string in uppercase format. If a character in the string doesn't have an uppercase version, that character stays unchanged in the returned string.
把string中的所有字符改为⼤写
Function: toUpper('<text>')
Example: toUpper('Hello World')
Output: HELLO WORLD
Remove leading and trailing whitespace from a string, and return the updated string.
移除string当中的所有空格
Function: trim('<text>')
Example: trim(' Hello World  ')
Output: Hello World

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。