UiPath 文本处理方法大全
UiPath中Split, Trim, Substring, Replace, Remove, Left, Right, IndexOf 等函数用法大全
Split
1
Spit用于拆分字符串 ,返回一个字符串数组
用法1: Split(text,”:”)
范例:
Sample_string= “Hello:World:Its:RPAPlus“
New_text=Split(Sample_String,”:”)
结果:
New_text(0) -> Hello
New_text(1) -> World
New_text(2) -> Its
New_text(3) -> RPAPlus
RPAPlus: Split函数往往应用于长字符串有明显分隔符的情况下,可以把长字符串拆分成一个个的短字符串。
用法2:text.Split(“:”.ToCharArray)
范例:
Sample_string= “Hello:RPAPlus:Its:Me“
New_text=Sample_String.Split(“:”.ToCharArray)
或者 New_text= Sample_String.Split(“:”c)
结果:
New_text(0) -> Hello
New_text(1) -> RPAPlus
New_text(2) -> Its
New_text(3) -> Me
RPAPlus: c 和 .ToCharArray的作用是一样
用法3:text.Split(“:”c)(2).ToString
当想直接输出对应某个拆分后的字符串的时候可以直接这样写。
范例:
Sample_string= “Hello:World:Its:RPAPlus“
结果:
Sample_string.Split(“:”c)(2).ToString -> Its
Substring
Substring用于提取字符串中间相对位置的子字符串。
用法1:text.Substring(0,5)
范例1:
Sample_string= “Hello:RPAPlus:Its:Me“
结果:
Sample_string.Substring(0,5) -> Hello
范例2:
Sample_string= “Hello:RPAPlus:Its:Me“
结果:
Sample_string.Substring(4,6) -> o:RPAl
用法2:text.Substring(text.Length-3)
范例3:
Sample_string= “Hello:World:Its:RPAPlus“
结果:
Sample_string.Substring(Sample_string.Length-3) -> us
TRIM,LTRIM,RTRIM
Trim用处是去空格
LTRIM去左边的空格,RTRIM去右边的空格
用法:text.Trim 或 Trim(text)
范例:
Sample_string= ” Hello WorldIts RPAPlus ”
New_text= Trim(Sample_string)
结果:
New_text -> “Hello World Its RPAPlus”
REPLACE
替换文本
用法:text.Replace(“”, “|”)
范例:
Sample_string= ” Hello WorldIts RPAPlus ”
New_text= Sample_string.Replace(” “, “|”)
结果:
New_text -> “|Hello|World|Its|RPAPlus|”
REMOVE
删除指定位置字符串
用法:text.Remove(0,5)
范例:
Sample_string= ” Hello RPAPlus Its Me ”
New_text= Sample_string.Remove(0,5)
结果:
New_text -> RPAPlus Its Me
LEFT
取字符串左边的内容
用法: Left(text, 7)
范例:
Sample_string= ” Hello RPAPlus Its Me ”
New_text= Left(Sample_string,7)
结果:
New_text -> Hello R
RPAPlus: Right 函数用法与Left一致,取字符串右边的内容。
IndexOf
查找指定字符串在文本中的位置,返回整型。
用法 text.IndexOf(“”)
范例:
Sample_string= ” Hello World, Its RPAPlus ”
Place=Sample_string.IndexOf(“,”)
结果:
Place.ToString -> 12
评论 (23)
1survivors| 2022-01-13
1characteristically
free gay/bi-sex chat sites| 2022-01-14
little gay boys who want to sex chat with men https://bjsgaychatroom.info/
gay black dating site| 2022-01-14
macro sonic dating sim gay https://gaypridee.com/
video chat older gay| 2022-01-15
free bi-gay chat lines https://gay-buddies.com/
best dating apps 2018 gay men| 2022-01-15
top gay dating sites dallas texas https://speedgaydate.com/
casino slots| 2022-01-29
google free slots https://2-free-slots.com/
armor slots| 2022-01-29
free penny slots https://freeonlneslotmachine.com/
free penny slots| 2022-01-29
san manuel online slots https://candylandslotmachine.com/
big fish slots| 2022-01-29
wms free online slots https://pennyslotmachines.org/
free slots vegas world| 2022-01-29
wizard of oz slots free https://slotmachinesworld.com/
goldfish slots| 2022-02-04
liberty slots instant play https://slotmachinesforum.net/
liberty slots casino| 2022-02-04
old vegas slots games https://slot-machine-sale.com/
free wizard of oz slots| 2022-02-04
real casino free slots https://beat-slot-machines.com/
quick hit slots| 2022-02-04
wms slots https://download-slot-machines.com/
dragon slots| 2022-02-04
baba wild slots casino https://411slotmachine.com/
slots blaze casino| 2022-02-04
free online casino slots https://www-slotmachines.com/
double diamond free slots| 2022-02-04
river slots app https://slotmachinegameinfo.com/
literature review dissertation| 2022-02-11
dissertation coaching https://buydissertationhelp.com/
dissertation structure| 2022-02-11
professional dissertation help reviews https://dissertationwriting-service.com/
how long is a dissertation defense| 2022-02-12
best dissertation help https://help-with-dissertations.com/
help with masters dissertation| 2022-02-12
writing dissertation literature review https://mydissertationwritinghelp.com/
writing a master's dissertation| 2022-02-12
dissertation help statistics https://dissertations-writing.org/
find a dissertation help tutor| 2022-02-12
dissertation editor near me https://helpon-doctoral-dissertations.net/