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 Comments

Character vector? Or string() object?
Character vector

Sign in to comment.

Answers (2)

regexprep(yourstring,' ','')

1 Comment

Also you could use strrep() in place of regexprep().

Sign in to comment.

Tags

Asked:

on 23 Jun 2019

Answered:

on 23 Jun 2019

Community Treasure Hunt

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

Start Hunting!