From: uap12 on
I have a textfiles that i read from, one trigger is for a dataline
that lookas like this
dmc \x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23

i try to trigger this by
if(sDMC.startsWith("DMC \\x")) {
bDMC = true;
}

But i don't get a hit, i know there is som fuzzy about the line
\x45\x23 ... but i can't do any thing about this, any way to do this ?

best regards
Anders

From: Andreas Leitgeb on
uap12 <anders.u.persson(a)gmail.com> wrote:
> I have a textfiles that i read from, one trigger is for a dataline
> that lookas like this
> dmc \x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23\x45\x23
> i try to trigger this by
> if(sDMC.startsWith("DMC \\x")) {
> bDMC = true;
> }
> But i don't get a hit,

Perhaps it's just the case-mismatch dmc vs DMC?

From: Roedy Green on
On Tue, 16 Mar 2010 08:57:18 -0700 (PDT), uap12
<anders.u.persson(a)gmail.com> wrote, quoted or indirectly quoted
someone who said :

>i try to trigger this by
>if(sDMC.startsWith("DMC \\x")) {
> bDMC = true;
>}
>
>But i don't get a hit, i know there is som fuzzy about the line
>\x45\x23 ... but i can't do any thing about this, any way to do this ?


You can simplify that to:
boolean bDMC = sDMC.startsWith ("DMC \\x");

Dump out sDMC surrounded in [ ] to make lead blanks more obvious.

do you want the letters DMC on the front? If not take them off.
--
Roedy Green Canadian Mind Products
http://mindprod.com

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question.
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.