Colleagues,
Hit a roadblock with generic wrapper-function CharTran() (equivalent of VFP's CHRTRAN()) around the built-in Replace() function.
And that's with that char #173.
Dunno why, but the line
renders sRetStr blank.
Initially, the sRetStr was "Proctor & Gamble @ 1234 W. St. #567, New York, NY 20000, U.S.A." (This's just a test string, not a real one.)
The task was to remove all non-alpha/numeric chars, that includes all the 2nd part of ASCII/ANSI table.
So I go in a For...Next cycle running that line above for every "bad" char. And everything worked, until cChar2Chage hit that Chr(173)... Boom! sRetStr == Space(0) - ?!?!?
I have it circumvented in the code, of course:
but that's a bandaid on a mortal wound.
Any advise on more enlightened resolution for this problem?
P.S. If you need me to, I can post here the entire code of this my lil' function.
Regards,
Ilya
Hit a roadblock with generic wrapper-function CharTran() (equivalent of VFP's CHRTRAN()) around the built-in Replace() function.
And that's with that char #173.
Dunno why, but the line
Code:
sRetStr = Replace(sRetStr, cChar2Change, "", 1, -1, iCompMethod)
Initially, the sRetStr was "Proctor & Gamble @ 1234 W. St. #567, New York, NY 20000, U.S.A." (This's just a test string, not a real one.)
The task was to remove all non-alpha/numeric chars, that includes all the 2nd part of ASCII/ANSI table.
So I go in a For...Next cycle running that line above for every "bad" char. And everything worked, until cChar2Chage hit that Chr(173)... Boom! sRetStr == Space(0) - ?!?!?
I have it circumvented in the code, of course:
Code:
If AscW(cChar2Change) = 173 Then Continue For
Any advise on more enlightened resolution for this problem?
P.S. If you need me to, I can post here the entire code of this my lil' function.
Regards,
Ilya