HOW I CAN REMOVE THE SPACE

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 日

1 投票

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 日

0 投票

yourstring(yourstring == ' ') = '' ;

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2019 年 6 月 23 日

回答済み:

2019 年 6 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by