Be the first to rate this file! 8 Downloads (last 30 days) File Size: 1.41 KB File ID: #41512 Version: 1.1

escapeString: convert special characters in a string into their escape sequences



26 Apr 2013 (Updated )

Escapes special characters (\r, \t, ', ...) in a string and returns the escaped string.

| Watch this File

File Information

Escapes special characters such as line feeds or tabs in a string and returns the escaped string. Useful for debug purposes.
Receives a string as a parameter and returns the escaped string that will reproduce the string when printing it with sprintf().
If you need to write the escape sequence using sprintf, double escaping by using
or passing a single escaped string as parameter sprintf('%s',escapeString(str)) will do the trick.
Note that this function is not optimized for speed.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements May work with versions prior to R2012a.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
24 May 2013 1.1

Improved the description

Contact us