Board index » jbuilder » Low values

Low values


2006-09-27 01:07:48 AM
jbuilder15
How do I trim trailing binary zeros out of a string?
I'm trying variations of:
char lowValue="\O0";
char mySpace = ' ';
mMessageDesc = mMessageDesc.replace(lowValue, mySpace).trim());
But I'm not getting the syntax down of the lowValue assignment.
 
 

Re:Low values

Howard Brazee wrote:
Quote
How do I trim trailing binary zeros out of a string?

I'm trying variations of:

char lowValue="\O0";
char mySpace = ' ';
mMessageDesc = mMessageDesc.replace(lowValue, mySpace).trim());

But I'm not getting the syntax down of the lowValue assignment.
Not being able to compile and test, here's my guess:
char lowValue = '\0';
How does a string end up with trailing NUL values?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html
 

Re:Low values

On 26 Sep 2006 10:27:06 -0700, "Kevin Dean [TeamB]"
< XXXX@XXXXX.COM >wrote:
Quote
How does a string end up with trailing NUL values?
It's s{*word*99}ing a screen that has them.
String myMessage = e.getMessage();
myMessage = myMessage.replace('\000', ' '); // low values to
space
I'd prefer something that was more obvious in the code, but that's
what comments are for.
 

{smallsort}