HOW I CAN REMOVE THE SPACE

3 ビュー (過去 30 日間)
ahmad abusara
ahmad abusara 2019 年 6 月 23 日
回答済み: Walter Roberson 2019 年 6 月 23 日
how i can remove the spacing from strings like this
i have this string ( STEP NOT OF PETS ) and i want it to be like this ( STEPNOTOFPETS )
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 6 月 23 日
Character vector? Or string() object?
ahmad abusara
ahmad abusara 2019 年 6 月 23 日
Character vector

サインインしてコメントする。

回答 (2 件)

madhan ravi
madhan ravi 2019 年 6 月 23 日
regexprep(yourstring,' ','')
  1 件のコメント
madhan ravi
madhan ravi 2019 年 6 月 23 日
Also you could use strrep() in place of regexprep().

サインインしてコメントする。


Walter Roberson
Walter Roberson 2019 年 6 月 23 日
yourstring(yourstring == ' ') = '' ;

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by