Hello,
I want to remove duplicates in one string anyone can help for that.
INPUT
Hello Good morning |this is XYZ im From ABC |this is XYZ im From ABC | Today My birthday
OUTPUT
Hello Good morning |this is XYZ im From ABC |Today My birthday
Thanks in advance.
AshwinS2
(Ashwin S)
2
Hi @Shriharsha_H_N
Try this
youstringvariable.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)
Thanks
Ashwin.S
sarathi125
(Parthasarathi)
3
Hi @Shriharsha_H_N,
The below line of code will resolve this, tested and working fine with the input you have mentioned here.
String.Join(" ", strInput.Split(" "c).Distinct())
6 Likes
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.