Select first element of a string

uiautomation
string

#1

How do I extract the first letter in a string?
Suppose I have a string stored in one variable example x=“test”. I need to get the letter “t” into another variable y.
How do I do it?


#2

@Akshay_Patti x = x.substring(0,1).Tostring


#3

@Akshay_Patti You can also use .Chars(0), that way it directly gets converted to a Char type variable.


#4

Thank you @indra


#5

Thank you @evangemert