I have a string like
"tom: 1, john: 3, timmy: 5, cid: 8, ad: 88, hid: 99, mn: 33"
i want to add line break after 3 commas each
"tom: 1, john: 3, timmy: 5, </br> cid: 8, ad: 88, hid: 99, </br> mn: 33"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe
forloop would be the most straightforward and clear solution but it is interesting to do it using LINQ: