fabien van mook

all packages "fvm-*"

package "fvm-xm"

function file "multilinestring.m"

Function r = multilinestring(s)
         [r, warnings] = multilinestring(s)

converts every multi-line string literal of the form
of "<<< ... >>>" into proper Octave single-quote
string literals.

E.g. the code:
  t = <<<Hello, world! This is some
  text within a multi-line-string
  literal.>>>
is converted into:
  t = 'Hello, world! This is some' ...
  'text within a multi-line-string' ...
  'literal.';

The input variabele s and the output variable r are
strings (i.e. row vectors containing characters).

The optional output variable warnings is a string and
contains messages when something seems wrong. If
the output is not requested, the warning messages
are directly printed on screen.

Note that the text between the tokens <<< and >>>:
-- is not changed at all: percent signs, single and 
   double quotes and backslashes retain their literal
   meaning;
-- may not contain the tokens <<< and >>>.

Note also that 
-- the function cannot handle well apostrophes (or 
   single quote characters) used as a transpose operator
   on a matrix or vector. Do not write such a transpose
   operator on the same line as <<< or >>>. Moreover,
   it is assumed that each string literal ('...' or 
   "...") is opened and closed on the same line;
-- the function cannot handle at all backslashes as a
   continuation character within multi-line double-quote
   string literals.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-xm" under GNU GPLv3+