Apex Count the number of occurences of a character(substring) in a string?
2:51 PMstring test='edwin.vijay.raymond';
system.debug('***'+test.countMatches('.'));
OUTPUT: 2
string test='edwin.vijay.raymond';
system.debug('***'+test.countMatches('.'));
OUTPUT: 2
0 comments