I have an app in which i have a string in which i have to count symbol and split that string accordingly and set it in textview.
code:-
int commas = 0;
String data = "Note:MRP shown , rates.The tariff plans are subject to change .Plans have been provided for information purposes only.";
for (int i=0; i < data.length(); i++) {
if (data.charAt(i) == ".") {
commas++;
}
}