HOW I CAN REMOVE THE SPACE

4 vues (au cours des 30 derniers jours)
ahmad abusara
ahmad abusara le 23 Juin 2019
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 commentaires
Walter Roberson
Walter Roberson le 23 Juin 2019
Character vector? Or string() object?
ahmad abusara
ahmad abusara le 23 Juin 2019
Character vector

Connectez-vous pour commenter.

Réponses (2)

madhan ravi
madhan ravi le 23 Juin 2019
regexprep(yourstring,' ','')
  1 commentaire
madhan ravi
madhan ravi le 23 Juin 2019
Also you could use strrep() in place of regexprep().

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 23 Juin 2019
yourstring(yourstring == ' ') = '' ;

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by