I am aware that in octave escape sequences are treated differently in single/double quotes. Nevertheless, there seems to be a type difference:
Whereas class("bla")
and class('bla')
are both char
,
typeinfo("bla")
is string
, whereas typeinfo('bla')
is sq_string
,
which may be short for single quote string.
More interesting, warning("on", "Octave:mixed-string-concat")
activates warning
that these two types are mixed.
So after activation, ["bla" 'bla']
yields a warning.
Note that typeinfo(["bla" "bla"])
is string
,
whereas if one of the two strings concatenated is single quote, so is the result,
e.g. typeinfo(['bla' "bla"])
is sq_string
.
I have a situation where someone activates the warning
and so I want to program so to avoid these.
Thus my question: is there a way to convert sq_string
to string
?
The core of my problem is that fieldnames seem to be single quoted strings.