Page 1 of 1

LenB(string.s) -> Size in bytes of a string.

Posted: Wed Apr 26, 2006 6:48 pm
by Flype
Maybe one day - not very important :

Code: Select all

Macro LenB(string)
  ( Len(string) * SizeOf(Character) )
EndMacro
Macro MemoryStringLengthB(hString)
  ( MemoryStringLength(hString) * SizeOf(Character) )
EndMacro

a$ = Space(128)

Debug Len(a$)
Debug LenB(a$)
Debug MemoryStringLength(@a$)
Debug MemoryStringLengthB(@a$)

Posted: Wed Apr 26, 2006 6:49 pm
by freak
Try StringByteLength() ;)

Posted: Wed Apr 26, 2006 6:54 pm
by Flype
oups, didn't seen this one :D thank you freak.

but for do have another magic function for MemoryStringLengthB() ?