www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - eating whitespace

reply "Peter Sommerfeld" <noreply rubrica.at> writes:
I wonder what the best, that means the fastest  way is
to remove all whitespace " \t\n\r" from as string.
Whitespace are distributed erratically within the string.

Peter
Feb 09 2013
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/9/13, Peter Sommerfeld <noreply rubrica.at> wrote:
 I wonder what the best, that means the fastest  way is
 to remove all whitespace " \t\n\r" from as string.
 Whitespace are distributed erratically within the string.

 Peter
Try "f\too\t\n\rb\nar".removechars("\t\n\r")
Feb 09 2013
parent "Peter Sommerfeld" <noreply rubrica.at> writes:
Am 09.02.2013, 22:30 Uhr, schrieb Andrej Mitrovic  
<andrej.mitrovich gmail.com>:

  "f\too\t\n\rb\nar".removechars("\t\n\r")
thanks, works... Peter
Feb 09 2013