>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Here is a
Lars> different (related) question. In the insetquote code there | is
Lars> this | if (disp == "<<") | code. How should I change it if disp
Lars> is a docstring so that it still | fits on one line. How do I
Lars> change a C string to something that | compares to a docstring?

Lars> The easies is perhap to create a ascii_guill:

Lars> docstirng ascii_guill; ascii_guill += char_type('<') ascii_guill
Lars> += char_type('<')

Lars> And use that for comparing

Lars>  if (disp == ascii_guill) ...

This I do not like much. This hides the meaning of the code,
especially since I have a 
else if (disp == ">>")
two lines after. A piece of trivial code is going to be changed to
something not so nice.

Lars> Or we can create a operator==(docstring const &, char *)

I thing I would like that.

Another point is that we make a great use of ostringstream for
handling strings. I'd like to have something comparable for docstring
(to which I can send C strings if needed maybe).

I am perhaps overestimating the number of cases where it is needed...

JMarc

Reply via email to