File Exchange

image thumbnail

verbatim: Get the text of a block comment.

version 1.1.0.0 (2.04 KB) by Douglas Schwarz
Verbatim returns the text contained in the next block comment.

5 Downloads

Updated 22 Mar 2009

View Version History

View License

Have you ever wanted to include a block of text in your m-file without having to worry about quotes ('), end-of-line characters (\n) and other formatting issues? Verbatim will return exactly the text contained in the block comment following the call to verbatim. Example:

str = verbatim;
%{
This is the text
that will be returned by verbatim.
%}

Cite As

Douglas Schwarz (2020). verbatim: Get the text of a block comment. (https://www.mathworks.com/matlabcentral/fileexchange/23194-verbatim-get-the-text-of-a-block-comment), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Robert Schiessl

Cool!

Muthu Annamalai

Excellent piece of code, to enable multi-line string literals in MATLAB

Patrick Mineault

Alexandre Gramfort

just works !

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!