Re: rtrim not working.................. -_-
- From: "Daimler" <daimler_6@xxxxxxxxxxxx>
- Date: Tue, 5 Dec 2006 20:44:22 +0800
x=instr(m,vbcr)
if x>0 then m=left$(m,x-1)
the above 2 lines should work for me.......
thank you a lot! -_-
daimler_smiles -_-
"Bob Butler" <tiredofit@xxxxxxxxxxx> wrote in message
news:uF8mLt8FHHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
"Daimler" <daimler_6@xxxxxxxxxxxx> wrote in message
news:el1fhn$rb1$1@xxxxxxxxxxxxxxxxxxxxxxx
sorry, i just checked the asc value and found out after right-
trimming, the value is asc 13 which is vbcr.
is there a best way to right-trim a character such as vbcr, ie. asc
13?
if you mean that you want to trim after the first vbCR then
x=instr(m,vbcr)
if x>0 then m=left$(m,x-1)
if you mean after the last vbCR then use InstrRev instead but...
m = Space(100000)
Get #filenum2, 1, m
Close filenum2
mm = RTrim(m)
might be better as
m=space$(lof(filenum2))
Get #filenum2,,m
close #filenum2
That way you only read what is there and may not have to trim anything.
If you do keep it the way you have it for some reason then you could also
consider using
m=string$(100000,vbNullChar)
so that you can search the string for the first Null character afterwards
rather than dealing with spaces which may be embedded in (what I am
assuming
is) the text being read.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
.
- References:
- rtrim not working.................. -_-
- From: Daimler
- Re: rtrim not working.................. -_-
- From: Daimler
- Re: rtrim not working.................. -_-
- From: Bob Butler
- rtrim not working.................. -_-
- Prev by Date: Re: Access caching problem?
- Next by Date: Problem updating a Date value into Access DB
- Previous by thread: Re: rtrim not working.................. -_-
- Next by thread: Re: Access caching problem?
- Index(es):
Relevant Pages
|
Loading