String manipulation UiPath

I have a string, Ram madhav
I need the output as ramdhv and its corresponding count 012345
ramdhv
012345
This should be the required output
I am able to find unique character but unable to get the count

Hi @Shilapshree_Mohanty

I am not cleared with your second point

Count.so u need to get the count as 012345?

Yes
For every unique character, it should say the count starting from 0

Hi @Shilapshree_Mohanty ,

Please check this file distinctString.xaml (5.0 KB)

strInput.Distinct().Count.ToString - this will return unique char count.

Thanks!

@Shilapshree_Mohanty
image
Use “System.Char” as Type argument for “For Each”

Hi @Shilapshree_Mohanty

Check this workflow
Main.xaml (8.1 KB)

Mark it as solution if it resolves your query

Regards
Nived N
Happy Automation

1 Like

Thanks much, it worked :slight_smile:

1 Like

Glad to know that it worked

Mark it as solution so that we can close the topic

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