What is the difference between these functions? Trim returns variant, containing string, and Trim$ returns just string. What does it do in practical use?
Or there are some other differences?
Thank you.
Vlad
Printable View
What is the difference between these functions? Trim returns variant, containing string, and Trim$ returns just string. What does it do in practical use?
Or there are some other differences?
Thank you.
Vlad
Trim$ uses less memory
Someone correct me if I'm wrong but specifically if I remember correctly the Variant data type uses a minimum of 16 bytes plus 1 for each character, whereas the string data type uses 1 byte per character.
Actually I think that Left uses 22 bytes plus string length and Left$ uses 10 bytes plus string length.
See http://msdn.microsoft.com/library/de...rpDataType.htm
Not only that it consumes less memory, but it does process faster (somewhere around 10% if I remember).
David Paulson