Developer

@RFIND

The RFIND function searches a string for a sub-string of characters beginning with the right-most character in a string and based on the function’s context, returns the sub-string when found, the position of the first character of the sub-string within the source string, or an indictor of whether the sub-string was found. This search can optionally be case-insensitive and may begin at the right-most character of the source string, or somewhere within the source string by specifying the first position, counting from the left, to begin searching.

When RFIND is called in a string context, the function will search a source string for a sub-string, returning that sub-string when found, or an empty string if not found.

When RFIND is called in an integral number context, the function will search a source string for a sub-string, returning the position of the first character of the sub-string within the source string when found, or -1 if not found. The left-most character of the source string is at position 0.

When RFIND is called in a Boolean context, the function will search a source string for a sub-string, returning true when found, or false if not found.

Parameters

    @RFIND (Source String, Search String [, Case Sensitive [, Start Position]])
  • Source String Required string parameter; contains the string value to be searched by the function.
  • Search String Required string parameter; contains the string value to search for within Source String.
  • Case Sensitive Optional Boolean parameter; when provided, specifies whether or not the search of Source String for the Search String value should be case-sensitive. When this value is true or not provided, the search is case-sensitive. If this value is false, case is ignored.
  • Start Position Optional integral number parameter; when provided, specifies the zero-based character position, counting from the left, within Source String to begin the search. If this value is not provided, the search begins at the right-most character within Source String. If this value is 0 or negative, an empty string is returned. If this value is equal to or greater than the total number of characters within Source String, the entire string is searched.

Supported Return Types

  • Boolean
  • Integral Number
  • String