Trim vs Trim$ 
Author Message
 Trim vs Trim$

I was told to use Trim$ instead of Trim on my VB6 code,
but none gives me a reason. I tested both of them and
found that they have the same behavior. I looked for Trim$
in the VB's help, but it sends me to Trim description. It
looks like if Trim$ is a heritage from BASIC.

Someone have information about this?

Thanks,

Fidias



Sun, 06 Mar 2005 01:58:58 GMT  
 Trim vs Trim$
Trim returns a variant (of string type), while Trim$ returns a string.

If you know you're never going to have Nulls, and you're assigning the
results of the function to a string variable (as opposed to a variant),
Trim$ should be marginally faster.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele



Quote:
> I was told to use Trim$ instead of Trim on my VB6 code,
> but none gives me a reason. I tested both of them and
> found that they have the same behavior. I looked for Trim$
> in the VB's help, but it sends me to Trim description. It
> looks like if Trim$ is a heritage from BASIC.

> Someone have information about this?

> Thanks,

> Fidias



Sun, 06 Mar 2005 07:08:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Trim() vs Trim$(), etc

2. Difference between trim and trim$

3. Trim not trimming?

4. Equivalent functionality to trim - but with a differenct character set trimmed

5. Trim Function

6. cross trim function and replace command

7. Right trim in table entries

8. Cant fix Trim error

9. Trim, Len, Mid Errors

10. Trim and DateAdd functions No Longer Working

11. Trim() function in query can't be run in Access Runtime Environment

12. Trim leading zeros from string

 

 
Powered by phpBB® Forum Software