Jean-Marc Lasgouttes wrote:
> Angus>     return int(lyx::count(str.begin(), str.end(),'\n') + 1);
> Angus> How many lines in: "foo\nbar\nbaz" ?
> 
> Two (that is, two new lines have been created). It is not the lines
> that are counted, but the carriage returns.

Ahhh. Thank you.

-- 
Angus

Reply via email to