replaces spaces with underscores or underscores with spaces; useful for desciptions/titles and file names
Alexandra (2021). Swap Spaces (https://www.mathworks.com/matlabcentral/fileexchange/32056-swap-spaces), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Very helpful for basic adjustments to file- and title-names. Thank you!
It would be more useful, if the user can decide if the spaces are converted to underscores or the other way around. E.g. if I want a filename without spaces, a swapping does not create the wanted result in 50% of the cases.
STRREP is faster than REGEXPREP.