substr Function

substr Function

               substr(str, offset, len)
The substr function converts its first argument (str) to string and extracts a sub-string from it using offset and len. offset and len are converted to integers. If len is omitted, null or negative, the actual length of the string is used. If offset is omitted, null or negative, zero is used as the offset.

The offset argument is zero-relative. substr extracts the sub-string at the specified offset for the specified length. If the length is zero or the offset exceeds the size of the string, an empty string is returned.

Examples:

  substr(str, 0, 1)        {* extract first character *}
  substr(str, 1)           {* remove first character *}


[Return to Previous Page] [Return to Main Page]
Jive(tm) 2, Copyright © 1997 FFE Software All Rights Reserved WorldWide