Add StringTheory to your application in a few Easy Steps!
Add the global and local extension
- Add the Global Extension:
Global -> Extensions -> Insert -> Activate CapeSoft
StringTheory.
For Multi-DLL apps - do this in the
main exe application.
- Add the Local extension to the procedure that you
wish to use StringTheory in.
This adds a StringTheory object to the procedure.
Using
StringTheory
The code below demonstrates using the
StringTheory class for a variety of common tasks.
In general a StringTheory object is
declared as simply as
st StringTheory
Where st is the label name (and can be almost anything.) The
length of the string is undefined, and is dynamic. In other words
the string will automatically grow, and shrink as required. You do
not need to worry about the length.
Values are assigned into the string using the SetValue method, or
by loading a file off the disk using the LoadFile method.
st.SetValue('hello world')
st.LoadFile('c:\windows\win.ini')
After that the string can be manipulated in a number of different
ways, using the methods described in the
Class Reference. For example to Base64
encode the string;
st.Base64Encode()
Distribution
If you use the Gzip or Gunzip methods in your application
then you will need to distribute the ZLIBWAPI.DLL with your
application. This DLL is located in your \3rdparty\bin or
\accessory\bin folder, and is also available from the official
source at
http://www.winimage.com/zLibDll/index.html. The Zlib library
home can be found here http://www.zlib.net.
ZLIB is the product of Jean-loup Gailly and Mark Adler and is
distributed under the terms of their license at
http://www.zlib.net/zlib_license.html .
|