Hi,
How can I count the the number of times a specific letter like b occurs in a string?
Thank you!!!
How can I count the the number of times a specific letter like b occurs in a string?
Thank you!!!
int count= 0; for (int i= 0; (i= indexOf(yourString, i)) != -1); i++, count++); return count;
int count= 0; for (int i= 0; (i= indexOf(yourString, i)) != -1); i++, count++); return count;
Comment