problem in compare strings
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Jan
el 31 de Jul. de 2012
strncmp :
str1 = 'Animation*;
str2 = 'Animation';
strncmp(str1, str2, length(str2))
1 comentario
huda nawaf
el 31 de Jul. de 2012
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!