Remove a string from another string
45 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Akzeptierte Antwort
KSSV
am 6 Mai 2021
str1 = 'bio-inspired' ;
str2 = 'bioinspired' ;
str=setdiff(str1,str2)
4 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!