phobos and splitting things... but not with whitespace.

Chad J chadjoan at __spam.is.bad__gmail.com
Sat Jun 23 08:37:08 PDT 2012


I'm realizing that if I want to remove exactly one line from a string of 
text and make no assumptions about the type of newline ("\n" or "\r\n" 
or "\r") and without scanning the rest of the text then I'm not sure how 
to do this with a single call to phobos functions.  I'd have to use 
indexOf and do a bunch of twiddling and maybe look ahead a character. 
It seems unusually complicated for such a simple operation.


More information about the Digitalmars-d-learn mailing list