int iPos= strSource.IndexOf(strToFind);
if ( iPos != -1 )
{
// found strToFind (which could be just a single character) inside strSource.
}
In c# which function is used to check whether a character is present in a string. give the syntax of function?
I believe it's IndexOf();
tempString.indexOf(character);
Returns -1 if it isn't in there anywhere.
sympathy flowers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment