problem in compare strings
Afficher commentaires plus anciens
hi,
if I want compare two strings
ex.
str1='Animation|Children's|Comedy'
i want to check just the first word and whatever the others words
str1='Animation*' str2= 'Animation'
i.e can I compare strcmp(str1,str2)?
thanks
Réponse acceptée
Plus de réponses (1)
Jan
le 31 Juil 2012
strncmp :
str1 = 'Animation*;
str2 = 'Animation';
strncmp(str1, str2, length(str2))
1 commentaire
huda nawaf
le 31 Juil 2012
Catégories
En savoir plus sur String Parsing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!