for(new i = 0; i < strlen(string); i++){ if(string[i] == '@') { //The string contains @. } else //The string doesn't contain @.}