OpenNTF.org - RightBack
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
RightBack 
Rating:
Rating: 2 , Number of votes: 1 
Contributor:
R v Laarhoven 
Category:
Lotusscript 
Type:
String Functions 
Notes Version:
R5.x 
Last Modified:
13 Jan 2005 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
Function RightBack( stringToSearch As String, Condition As Variant ) As String

On Error Goto handleErr
Dim Macro As String
Dim Result As Variant
If Typename(Condition) = "STRING" Then Condition = {"} & Condition & {"}
Macro = {@RightBack("} & stringToSearch & {";} & Condition & {)}
Result = Evaluate(Macro)
RightBack = Result(0)
Exit Function
handleErr:
RightBack=""
Exit Function
End Function

Usage / Example
Parameters:

stringToSearch
Text. The string whose rightmost characters you want to find.

Condition
numberOfChars
Number. Counting from left to right, the number of characters to skip. All the characters to the right of that number are returned.

subString
Text. A substring of stringToSearch. @RightBack returns all the characters to the right of subString. It finds subString by searching stringToSearch from right to left.

Return value
resultString
Text. The rightmost characters in stringToSearch. The number of characters returned is determined by either numberOfChars or subString.
 Comments
Posted by Stan Rogers on 01/13/2005 10:31:22 AMNice, but...
LotusScript has been able to do that natively since StrRightback was introduced in R5. See also:
StrRight
StrLeft
StrLeftback
 Add your comment!