From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03120411.xhp | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03120411.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03120411.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03120411.xhp b/helpcontent2/source/text/sbasic/shared/03120411.xhp new file mode 100644 index 000000000..5ba7cc315 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03120411.xhp @@ -0,0 +1,76 @@ + + + + + + + InStrRev Function [VBA] + /text/sbasic/shared/03120411.xhp + + + + + + +
+ + InStrRev function + + + +InStrRev Function [VBA] +Returns the position of a string within another string, starting from the right side of the string. +
+ +The InStrRev function returns the position at which the match was found, from the right. If the string was not found, the function returns 0. + + +InStrRev (Text1 As String, Text2 As String [,Start As Long] [, Compare As Integer]) + + +Long + + Text1: The string expression that you want to search. + Text2: The string expression that you want to search for. + Start: Optional numeric expression that marks the position from the left in a string where the search for the specified substring starts. If you omit this parameter, the search starts at the last character of the string. The maximum allowed value is 65535. + Compare: Optional numeric expression that defines the type of comparison. The value of this parameter can be +1: The default value of 1 specifies a text comparison that is not case-sensitive. +0: The value of 0 specifies a binary comparison that is case-sensitive. +To avoid a run-time error, do not set the Compare parameter if the first return parameter is omitted. + + + + +Sub ExamplePosition +Dim sInput As String +Dim iPos As Integer + sInput = "The book is on the table" + iPos = InStrRev(sInput,"the",10,1) ' Returns 1, search is case-insensitive + Print iPos + iPos = InStrRev(sInput,"the",10,0) ' Returns 0, search is case-sensitive + Print iPos +End Sub + + +
+InStr +
+ + +
-- cgit v1.2.3