Hi there,
I am running into a problem which I can’t fix.
There are some simular topics about it but for me it doesn’t do the trick.
In a string (strInput) I have the text: “CAT cat caterpillar S3 ESD”
I would like to remove the second ‘cat’
So the result must be:
CAT caterpillar S3 ESD
I tried:
String.Join(" “, strInput.Split(” “c).Distinct())
or
String.Join(” “, strInput.ToLower.Split(” "c).Distinct())
The first one doesn’t do anything and the second one works but returns the complete string in lowercases. I would like to keep the uppercases (CAT caterpillar S3 ESD)
Who is my hero of the day with the right solution?
Many, many thanks in advance!