Crystal Reports for Eclipse Designer Guide

InStrRev

Description
InStrRev returns the position of the first occurrence of one string within another.
Overloads
  • InStrRev (inputString, findString)
  • InStrRev (inputString, findString, startPosition)
  • InStrRev (inputString, findString, startPosition, compare)
  • Arguments
  • inputString is the text string to be searched.
  • findString is the text string being sought within str1.
  • startPosition is an optional numeric expression that sets the starting position for each search. If omitted, –1 is used, which means that the search begins at the last character position.
  • compare is an optional numeric value indicating the kind of comparison to use when evaluating substrings:
    • 0 performs a comparison that is case-sensitive
    • 1 performs a comparison that is case-insensitive
    If omitted, a case-sensitive comparison is performed.
  • Returns
    Number value that indicates the position of the matching string in the string to be matched. The first character of inputString (from the beginning) is 1.
    Action
    InStrRev returns the position of the first occurrence of one string within another. The matching proceeds in the reverse direction from the specified start position.
    Examples
    InStrRev ("abcdefgbchijk", "bc")
    Returns 8, where matching starts from the very end of the string in the reverse direction.
    InStrRev ("abcdefgbchijk", "bc", -1)
    Returns 8, where matching starts from the very end of the string in the reverse direction.
    InStrRev ("abcdefgbchijk", "bc", 2)
    Returns 0, i.e., no match is found. Matching starts from the "b" in "ab" in the reverse direction.
    InStrRev ("abcdefgbchijk", "bc", 3)
    Returns 2. Matching starts from the "c" in "abc" in the reverse direction.
    InStrRev ("abcdefgbchijk", "bc", 10)
    Returns 8. Matching starts from the 'h' in "abcdefgbch" in the reverse direction, and the first occurrence of "bc" is found at position 8 from the beginning of the input string.
    InStrRev ("abcdefgbchijk", "BC", -1, 1)
    Returns 8. Matching starts from the very end of the string in the reverse direction, and the first occurrence of "BC", independent of case since case-insensitive comparison is specified, is found at position 8 from the beginning of the input string.
    InStrRev ("aBCdefgbchijk", "BC", -1, 0)
    Returns 2. Matching starts from the very end of the string in the reverse direction, and the first occurrence of "BC" is found at position 2 from the beginning of the input string.



    SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/