"abc,off,kl,mell" Separate by "," and get the count , the result is 4!!!!
thanks
matt
Please add next code to the Code tab before auto generated code.Matt wrote:how to get the count of a string Separate by “,” ? For example
"abc,off,kl,mell" Separate by "," and get the count , the result is 4!!!!
Code: Select all
public int SplitByCommaLength(string st)
{
return st.Split(new char[] {','}).Length;
}
Code: Select all
{SplitByCommaLength("abc,off,kl,mell")}