hi
i have string “Venkat” i need to disp only first 2 characters “Ve”
how to disp pls help me
thank you
hi
i have string “Venkat” i need to disp only first 2 characters “Ve”
how to disp pls help me
thank you
Use string function like substring.
sorry
actually i don’t know how to write substring function in uipath
can u pls send me the substring
string str = yourStringVariable.Substring(0,2)
Regards…!!
Aksh
tysm!! its working now
thanq
Just in case another person wants an alternative a .left() function will also work.This outputs a specified number of characters starting from the left hand side of the string. There is also .right() which, as you can imagine, goes from the right hand side of the string.
so instead you may want it to be
a=“VenkatP”
b = a.left(2) // outputs as “Ve”
Thanks
@pllo2ptk
I tried using Assign
text = Left(“hello”, “length”)
Gives me error: Options strict on disallows implicit conversions from ‘string’ to ‘integer’
Check variable type of TEXT → must be string
Example
text = left(“aaaa”, 2)
Hi @pllo2ptk,
I have a scenario like in excel I have a data
Example - TSPRST12378QR-QT
Here I need to remove from right side first R,with including that R I need to remove
I’m facing like it was taking from first R it was removing entire thing
output - TSPRST12378Q
I need output like this,can you suggest me
If the end of the string is always going to be the same length you could do:
text = right(yourvariable, 3) in assign.
There is probably a better way to do this though in case the string increases in length, using split.
R-QT will be always at the end?