-1
mon codeComment rechercher plusieurs mots dans un texte en Objective-C?
NSString * mistring = @"hello hello hello.";
NSRange detect; detect = [mistring rangeOfString: @"@hello"];
if (detect.location == NSNotFound)
{ NSLog(@"Not Found.");
}else{ NSLog (@"Se ha encontrado una coincidencia en la posición: %i", detectar.location); NSLog (@"Está tiene %i caracteres.", detectar.length); }
ce code ne montrent 1 "bonjour" mais je besoin de l'application me montrer 3 "bonjour"
Cela ne fait aucun comptage. – rmaddy
Ok, essayez-le maintenant. –