Equinox Online Help - Language Reference - A to Z

Home

AfterStr [Function]

Applies to
Syntax(TargetString, SearchString [, IgnoreCaseExpression])
Action[Function] Returns the contents of TargetString which appears after SearchString.
ScopeUsable anywhere.
Notes

This function searches for SearchString in TargetString, and if found returns all the characters in TargetString after SearchString begins. If SearchString is zero length or is not found, it returns a zero length string. IgnoreCaseExpression can have any of the following values:is supplied and is nonzero, case is ignored during the search. If it is not supplied or zero, case is not ignored.

  • 0 or null case is not ignored
  • 1 case is ignored
  • 2 include the first search string as part of the result (this is only available in Version 5)

To specify more than one attribute add these numbers together.

CategoryString handling
See Also AfterStr_Statement, BeforeStr_Statement, BeginsWith, BetweenStr_Statement, BeforeStr_Function, BetweenStr_Function
Example

The following example prints the string "Hello":

Print AfterStr("Please say Hello", "SAY ", 1)

This example relies on Equinox's ability to automatically convert from string to number:

number total
string description

description = "Total payable: £312 within 30 days"

total = AfterStr(Description, "£")

This example removes everything after the phrase "top secret", if it is found in the string, and replaces it with a notice:

AfterStr(text, "top secret", 1) = " TEXT REMOVED"

This example prints the phrase "the West Indies"

Print AfterStr("My sister has gone to the West Indies","the",3)