problem in compare strings
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Jan
il 31 Lug 2012
strncmp :
str1 = 'Animation*;
str2 = 'Animation';
strncmp(str1, str2, length(str2))
1 Commento
huda nawaf
il 31 Lug 2012
Categorie
Scopri di più su String Parsing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!