SIMPOL Documentation

getlastitem()

Description

This function steps through a string looking for a specific separator character. When it finds the last instance, or if it finds no instance it returns the remainder (or all) of the string. This is useful if you have a list of items in a string and you only need to retrieve the last item, such as when looking for the message responded to in an NNTP References header field, where the message responded to will always be the last entry. Returns a string containing the last substring found following the last instance of the sSeparator character, or the whole string if no instance of the sSeparator character is found.

Prototype

getlastitem ( string sSrc, string sSeparator )

Parameters

ParameterDefault valueType nameDescription
sSrcNonestring
sSeparatorNonestring