How to Find Index of Character if our string contain duplicate Character
Ex:String Saaannndhya
How to Find index of ecah a,and each n
How to Find Index of Character if our string contain duplicate Character
Ex:String Saaannndhya
How to Find index of ecah a,and each n
Hey!
Have a view on this thread
Regards,
NaNi
I need index of duplicate character
not count of duplicate character
Try this approach
Str.Distinct.Where(Function(x) Str.Count(Function(y) y.Equals(x)) >1).ToDictionary(Function(k) k.ToString, Function(v) Regex.Matches(Str, v).Cast(Of Match).Select(Function(x) x.Index).toArray)
xaml for reference
IndexOfDuplicateCharacters.xaml (5.1 KB)