Slashes Fix
Version 1.0.0 (1.12 KB) by
Valerio Rubino
Replace \ with /. Helpful to use sprintf, compose etc.
Some functions (e.g. compose, sprintf, fprintf) use the backward slash ('\') as escape character; therefore, any format specifier containing a backward slash result into error (Warning: Escaped character '\%' is not valid.). This function simply change any backward to forward slash, coping with the issue.
e.g. sprintf(slashes_fix(formatSpec),txt)
Cite As
Valerio Rubino (2024). Slashes Fix (https://www.mathworks.com/matlabcentral/fileexchange/90471-slashes-fix), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |