Find Total Number of Line

Hi Friends,
How to find total number of line from string in uipath
ex. Input is -
Sunday
Monday
Tuesday

o/p should be :- count is 3
how we can achieve it.

@Rup_1

Try below expression.

   lineCount = inputStr.Split(Environment.NewLine.ToCharArray).Count

The expression be like
Int_count = Str_input.Split(Environment.Newline.ToArray()).Count
Where int_count is a variable of type int32

Now use a writeline activity like this
”Count is “+int_count.ToString

Cheers @Rup_1

Hi @Rup_1

str.split.(Environment.NewLine.ToCharArray).length

Cool,
Regards,
Gulshiyaa

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.