Simple String Cleanup Utility

Simple utility function that cleans up stray characters and spaces from strings so they can be used

Ahora está siguiendo esta publicación

Simple utility function that cleans up stray characters and spaces from strings so they can be used without causing errors or changes in format.

Function call removes anything not alphabetic or numeric, including underscore:

newstr = cleanstr(instr)

* I leave this function in my path and end up calling it pretty often. Works well with strings grabbed from filenames to be used in titles or legends on plots. Can be called embedded from those formatting statements.

Citar como

Rob Slazas (2026). Simple String Cleanup Utility (https://la.mathworks.com/matlabcentral/fileexchange/21419-simple-string-cleanup-utility), MATLAB Central File Exchange. Recuperado .

Categorías

Más información sobre Characters and Strings en Help Center y MATLAB Answers.

Información general

Compatibilidad con la versión de MATLAB

  • Compatible con cualquier versión

Compatibilidad con las plataformas

  • Windows
  • macOS
  • Linux
Versión Publicado Notas de la versión Action
1.0.0.0