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 Kommentare

Walter Roberson
Walter Roberson am 23 Jun. 2019
Character vector? Or string() object?
ahmad abusara
ahmad abusara am 23 Jun. 2019
Character vector

Melden Sie sich an, um zu kommentieren.

Antworten (2)

madhan ravi
madhan ravi am 23 Jun. 2019

1 Stimme

regexprep(yourstring,' ','')

1 Kommentar

madhan ravi
madhan ravi am 23 Jun. 2019
Also you could use strrep() in place of regexprep().

Melden Sie sich an, um zu kommentieren.

Walter Roberson
Walter Roberson am 23 Jun. 2019

0 Stimmen

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

Tags

Gefragt:

am 23 Jun. 2019

Beantwortet:

am 23 Jun. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by