Remove a string from another string
Afficher commentaires plus anciens
I have two strings like 'bio-inspired' and 'bioinspired'. I want to essentially subtract one string from another and get '-' in the end. How can I delete all letters appearing in one string from another string? The erase function doesn't work for this case.
Réponse acceptée
Plus de réponses (1)
Ezma Nasr
le 15 Fév 2023
0 votes
str='bio-inspired';
newStr = erase(str,"-")
Catégories
En savoir plus sur Characters and Strings 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!