How to find the occurences of each character in the given string-“aadfggggtryionnb”?
refer to this
testnew.xaml (8.7 KB)
create dictionary and loop over each character in string,
for each character,
dict(letter) = str.Where(Function(c) c = letter).Count
are there any other methods?
Hi @ydash999 ,
Check the below Method :
you can assign this value to a Dictionary of String,Integer variable.
Above link is a more simplified solution. Remember to import System.Text.RegularExpressions first
how can i find occurence of each character with this?
You assign below to a string variable.
“item” will be your string variable
i dont have to find the total count, but count of occurences of each character
I just edited the “Total” to “a”. This is where you put the character you want to find
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.