Re: Supercharge your peek_string()
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 29, 2001
- 421 views
Al, I've incorporated your peek_string idea into win32lib. Thanks for the idea. It works fast because I suspect it's written in optimized assembler. I have no idea what Matt is on about. These strings are just byte arrays that are terminated with a #00 byte. Just try this experiment... atom addr integer len1, len2 addr = allocate(100) poke(addr, "abcdefghijklmnopqrstuvwxyz" & 0) len1 = c_func(xlstrlen, {addr}) len2 = c_func(xlstrlen, {addr + 1}) -- len2 --> 25 -- len1 --> 26 ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower."