Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
please help me any one.iam need the answers.
Posted

C#
string str = "My name is sudip  saha";
        string[] strArr = str.Split(' ');

        foreach (string st in strArr)
        {
            if (st == string.Empty)
            {
                //it is for double space
            }
        }
 
Share this answer
 
Comments
MarqW 16-Mar-12 6:00am    
That's not VB6 code
You can use the InStr function
 
Share this answer
 
Comments
baskar87 16-Mar-12 5:59am    
yes but not find the double space.
MarqW 16-Mar-12 6:01am    
Sure you can. I can't remember the exact syntax, VB6 was a while ago, but something like this

[code]
If Instr(varName, " ") <> -1 Then ContainsDoubleSpace = True
[/code]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900