ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Split lines in input stream
Date Mon, 04 Aug 2008 17:54:43 GMT

--- srimh2o <sriram@mh2o.com> wrote:

> 
> If this is complicated is there any way I can insert
> a linebreak between
> Hello and World?

If you're just doing this for testing purposes, Ant
loads all Java system properties, so you can insert
your platform separator by simply embedding
${line.separator}.

-Matt

> 
> srimh2o wrote:
> > 
> > Ahh, this is verbatim, but you are correct. The
> \r\n does not substitute
> > for CRLF (0x0d, 0x0a). Then what I would like to
> do is somehow specify
> > Hello <CRLF> world and then get the output as:
> > Hello
> > World
> > 
> > Any suggestions on how to do this?
> > 
> > Thanks.
> > 
> > 
> > Scot P. Floess wrote:
> >> 
> >> Is this verbatim?  If so,, part of your problem
> is the literal characters 
> >> \r and \n are note the escaped counterparts...
> >> 
> >> Meaning if I had this:
> >> 
> >> Hello r n World
> >> 
> >> The r and the n are literals...and you'd see the
> same output as you are 
> >> seeing now...
> >> 
> >> 
> >> 
> >> On Mon, 4 Aug 2008, srimh2o wrote:
> >> 
> >>>
> >>> Hi,
> >>>
> >>> I have a string input that contains carriage
> return "\r\n" and I'd like
> >>> to
> >>> use ant to split that input into two separate
> lines. This is what I do.
> >>>
> >>> <concat append="true"
> destfile="testing.jad">Hello \r\n World
> >>> 			<filterchain>
> >>> 				<tokenfilter />
> >>> 			</filterchain>
> >>> 		</concat>
> >>>
> >>> I'd like the output to look like this:
> >>> Hello
> >>> World
> >>>
> >>> Instead i get this:
> >>> Hello \r\n World
> >>>
> >>> Please help.
> >>>
> >>> Thanks
> >>> -- 
> >>> View this message in context:
> >>>
>
http://www.nabble.com/Split-lines-in-input-stream-tp18814904p18814904.html
> >>> Sent from the Ant - Users mailing list archive
> at Nabble.com.
> >>>
> >>>
> >>>
>
---------------------------------------------------------------------
> >>> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >>> For additional commands, e-mail:
> user-help@ant.apache.org
> >>>
> >>>
> >> 
> >> Scot P. Floess
> >> 27 Lake Royale
> >> Louisburg, NC  27549
> >> 
> >> 252-478-8087 (Home)
> >> 919-754-4592 (Work)
> >> 
> >> Chief Architect JPlate  
> http://sourceforge.net/projects/jplate
> >> Chief Architect JavaPIM 
> http://sourceforge.net/projects/javapim
> >> 
> >> Architect Keros         
> http://sourceforge.net/projects/keros
> >> 
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail:
> user-help@ant.apache.org
> >> 
> >> 
> >> 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Split-lines-in-input-stream-tp18814904p18816107.html
> Sent from the Ant - Users mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message