As of Win32, the normal edit box controls do not have hard limits (to be
precise, they have 2GB-1 limit...,
http://msdn2.microsoft.com/en-us/library/ms672096.aspx) the
practical(technical) limit comes, IMHO, from the available memory ad
required performance. The .NET does not seem to expose any further
limitations so it's only a memory/performance problem.
Preallocating memory may be a good thing.
From the user point of view, the ability to see 4 days old things might not
be interesting so another practical limit can come from there.
The use of indexOf()/lastIndexOf() and substring is the best I can think of
for now.
If you have some fixed lengths, you can play with count parameter of
indexOf..
"Lilith" <li****@dcccd.eduha scritto nel messaggio
news:2l********************************@4ax.com...
I'm looking at practical string lengths and the capacity of a text
box. I'm using a string to progressively add the status of a process
periodically and dumping that text into a text box. I don't mind
trimming the first x number of lines from the string when it reaches
certain limits, but I'd like to know at what point I may be
approaching an exception being thrown, an application crash or system
memory getting consumed.
If possible, I'd also like some suggestions as to the best way to trim
the first few lines of the string, which will be delimited by \r\n.
Thanks,
Lilith