Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » A way to change what represents
A way to change what represents [message #16294] Fri, 06 June 2008 15:00 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Is there a way to change what characters are inserted when using "\n" (i.e. like when writing to a stream)? OS dependent value is not good for my current need, I need fixed one.

If there isn't I guess I can run a in-memory replace before writing to disk, but the operation is sure to be expensive.
Re: A way to change what represents [message #16298 is a reply to message #16294] Fri, 06 June 2008 15:34 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Why don't you output \015 instead (I hope this is 13, wrote it from head), or whatever you want to get into stream.
Re: A way to change what represents [message #16300 is a reply to message #16298] Fri, 06 June 2008 16:09 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Probably because of the fact that I'm not entering the newline manually makes the obvious solution even more difficult to pick Smile.
Re: A way to change what represents [message #16307 is a reply to message #16294] Sat, 07 June 2008 10:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Fri, 06 June 2008 09:00

Is there a way to change what characters are inserted when using "\n" (i.e. like when writing to a stream)? OS dependent value is not good for my current need, I need fixed one.

If there isn't I guess I can run a in-memory replace before writing to disk, but the operation is sure to be expensive.


Actually, current U++ NEVER tests for '\n' in output stream (with exception of Cout()).

The reason is that such test has very negative impact on Stream performance and it seems to be not very difficult to manage this in client code.

Mirek

[Updated on: Sat, 07 June 2008 10:46]

Report message to a moderator

Re: A way to change what represents [message #16345 is a reply to message #16307] Mon, 09 June 2008 14:52 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Yes, you are right. Another place is Stream::PutLine(), which picks EOL chars based on OS type.
Previous Topic: MemoryBreakpoint definition?
Next Topic: NULL
Goto Forum:
  


Current Time: Wed May 01 05:47:25 CEST 2024

Total time taken to generate the page: 0.03082 seconds