On Tuesday 05 November 2002 10:53 am, Lars Gullik Bj�nnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | To tell me that my thought process is invalid is just plain rude.
>
> At least I stay away from the "f" words.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
I promise not to swear and apologise for having done so.
How do you propose to fix the broken code? There are other places where this
sort of idea is hard-coded, eg InsetCommandParams (see below). It would be
very useful to have a (suitably named) pair of functions that work as I
envisaged getVectorFromString, getStringFromVector doing.
Regards,
Angus
string const InsetCommandParams::getAsString() const
{
return cmdname + "|++|" + contents + "|++|" + options;
}
void InsetCommandParams::setFromString(string const & b)
{
string::size_type idx = b.find("|++|");
if (idx == string::npos) {
cmdname = b;
contents = "";
options = "";
return;
}
cmdname = b.substr(0, idx);
string tmp = b.substr(idx+4);
idx = tmp.find("|++|");
if (idx == string::npos) {
contents = tmp;
options = "";
} else {
contents = tmp.substr(0, idx);
options = tmp.substr(idx+4);
}
}