Arbortext IsoDraw > Macro Language Reference > Functions and Data Types > Functions > String Functions
  
String Functions
There are some special string functions in the Arbortext IsoDraw Macro Language:
eval (source)
Evaluates a sting as a mathematical function.
lower (source)
Converts the string to lowercase.
upper (source)
Converts the string to uppercase.
len (source)
Returns the length of a string.
left (source , count)
Returns the string’s left most characters equal to the count.
right (source, count)
Returns the string’s right most characters equal to the count.
mid (source, start ,count)
Returns the string’s characters from the given start to the right, equal to the count.
MACRO String Characters
DEFINE str AS string
str = "123456789"
MESSAGE "the string is: " + str
MESSAGE "the first three: " + left(str, 3)
MESSAGE "the last four: " + right(str, 4)
MESSAGE "the 4th to 6th: " + mid(str, 4, 3)
END MACRO
find (source, search, start)
Returns the character position of the search term. Only searches to the right of the start term.
stripExt (source)
Returns the string without an extension.
getExt (source)
Returns the string’s extension.
stripFileName (source)
Returns the string without the file name (i.e. returns the path).
getFileName (source)
Returns the string’s file name and extension (i.e. without the path)
MACRO Path, Name and Extension Info
NEW
SAVE "C:\Program Files\ITEDO Software\NameSample.iso"
MESSAGE "the file's full path is: " + $Newline + activeDoc.path
MESSAGE "the file's full name is: " + $Newline + activeDoc.name
MESSAGE "the file's name minus extension is: " + $Newline +
stripExt(activeDoc.name)
MESSAGE "the file's extension is: " + $Newline + getExt(activeDoc.name)
MESSAGE "the file's path without its name is: " + $Newline +
stripFileName(activeDoc.path)
END MACRO
isAlpha (source)
Returns if the string is composed entirely of alpha characters as boolean.
isDigit (source)
Returns if the string is composed entirely of digits as boolean.
isLower (source)
Returns if the string is composed entirely of lower case alpha characters as boolean.
isUpper (source)
Returns if the string is composed entirely of upper case alpha characters as boolean.
isSpace (source)
Returns if the string is composed entirely of spaces as boolean.
isAscii (source)
Returns if the string consists entirely of characters found in the first 128 from the ASCII character map as boolean.
isControl (source)
Returns is the string consists entirely of control characters (such as TAB) as boolean.
isPrintable (source)
Returns is the string consists entirely of printable characters (i.e. without control characters) as boolean.
isNumerical (source)
Returns if the string is numerical as boolean. This differs from isDigit (e.g. -99.9 is not true as isDigit, but is true as isNumberical).
code (source)
Returns the first character’s code from the Ascii character map as integer.
char (source)
Returns the character for the character from the Ascii character map for the given integer value.
MACRO stringFunctions
DEFINE txt AS string
txt = "Arbortext IsoDraw Macro Language"
MESSAGE txt
MESSAGE len(txt)
MESSAGE upper(txt)
MESSAGE lower(txt)
END MACRO