How to delete the first or the first two characters in a string?
조회 수: 229 (최근 30일)
이전 댓글 표시
Hello,
How can i delete the first two characters of this string? Thank you
string='W987';
댓글 수: 0
채택된 답변
추가 답변 (1개)
the cyclist
2022년 4월 28일
@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
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!