How to delete the first or the first two characters in a string?
229 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
How can i delete the first two characters of this string? Thank you
string='W987';
0 Commenti
Risposta accettata
Più risposte (1)
the cyclist
il 28 Apr 2022
@KSSV's answer is accurate in your case, but will not work on the string "W987". The following will work for either a character array or a string:
c = 'W987';
eraseBetween(c,1,2)
s = "W987";
eraseBetween(s,1,2)
0 Commenti
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!