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

バージョン 1.1.0.0 (1.41 KB) 作成者: Christian
Escapes special characters (\r, \t, ', ...) in a string and returns the escaped string.
ダウンロード: 450
更新 2013/5/24

ライセンスの表示

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
sprintf(escapeString(escapeString(str)))
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.

引用

Christian (2024). escapeString: convert special characters in a string into their escape sequences (https://www.mathworks.com/matlabcentral/fileexchange/41512-escapestring-convert-special-characters-in-a-string-into-their-escape-sequences), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCharacters and Strings についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Improved the description

1.0.0.0