Home
> Software
> String Handler
The Minds Eye String Handler Version 1.1.0
|
The Minds Eye String Handler is a FREE XTRA for use by developers writing lingo for
Macromedia Director versions 8.5 to MX 2004 and currenlty under Win32 Operating Systems only. It is designed to be similar in look and
feel to standard string handling objects found in many oo languages such as java,
delphi and c++.
The Minds Eye String Handler XTRA provides standard high level string handling methods
for inserting and ammending text data, such as string comparison, concatenation, insertion,
search and replacement.
|
 |
|
Re-inventing The Wheel
String handling is core to many applications. Whether parsing data in a config file or
dealing with the vaguaries of user input; at some point most software developers will
have found themselves having to (re)write a suite of custom string handling routines.
We at Minds Eye Visualisation are no exception to this. When designing our string handling
routines for use within lingo our requirements were reliability, re-use and performance.
But rather than re-invent the wheel yet again, we rummaged about for something that was
already doing the job well. Something tried and tested. And we found what we were looking
for in StdString.h.
The Minds Eye String Handler encapsulates (with a few extra
touches of our own) this neat little piece of work by Joseph M. O'Leary.
|
|
|
|
Download String Handler
Click here to download your free copy of the String Handler XTRA.
>> Download Now!
|
|
|
Example
Why do this :
on SearchAndReplace input, stringToFind, stringToInsert
output = ""
findLen = stringToFind.length - 1
repeat while input contains stringToFind
currOffset = offset(stringToFind, input)
output = output & input.char [1..currOffset]
delete the last char of output
output = output & stringToInsert
delete input.char [1.. (currOffset + findLen)]
end repeat
set output = output & input
return output
end
|
(Time taken to run 1000 times on a 31196 byte string = 7452 milliseconds)
When you could do it like this:
output=mevgReplaceS(input, stringToFind, stringToInsert)
|
(Time taken to run 1000 times on a 31196 byte string = 142 milliseconds)
Three good reasons why you might want to use The Minds Eye String Handler
String Handler is fast. It will out perform many comparable operations written in lingo.
String Handler is small . At only 40K this XTRA will not sink your applications.
String Handler is FREE! What are you waiting for?
|
|