|
String
Functions
The string functions
here enhance what Macro Express has provided for us all. We
have found on numerous occasions that we were repeating code
within string handling routines for various tasks, so we created
reusable functions instead.
Even though some of these functions
appear to do the same thing as the built-in Macro Express commands,
each has major differences. For example, where Macro Express
allows padding a string on either the left or right sides, these
functions will center a string and, if chosen, will use a character
other than a space for padding. You can search for a specific
occurrence of a string within a string, and not be limited to
just the first one. Instead of changing a string to all upper
or lower case, each individual word can be capitalized. See
the individual function for more differences. The String category
is comprised of ten functions.
{ String - Occurs } Returns the
number of occurrences of a one string inside another string
{ String - Pad } Pads a string on the left or right sides, or
centers it using a specific pad character
{ String - Pad Center } Centers a string (pads both sides) using
a specific pad character
{ String - Pad Left } Pads a string on the left side using a
specific pad character
{ String - Pad Right } Pads a string on the right side using
a specific pad character
{ String - Parse } Parses an input string based on a character
or string delimiter
{ String - Proper } Converts a string to proper case where each
word begins with a capital letter
{ String - Replicate } Replicates a string
{ String - Reverse } Reverses a string
{ String - Search } Returns the starting position of one string
inside another string
Examples
{ String Example - Occurs }
{ String Example - Pad Center }
{ String Example - Pad Left }
{ String Example - Pad Right }
{ String Example - Pad }
{ String Example - Parse }
{ String Example - Proper }
{ String Example - Replicate }
{ String Example - Reverse }
{ String Example - Search }
Next: Math
and Science
|