RightSeparator ( text ; separator ; occurrence ; direction )
Returns the characters in text counting from the right to the specified occurrence of the separator.
Average rating: 3.8 (51 votes) Log in to vote
Kurt Otto - Show more from this author
ottopiaDESIGN http://ottopia.dyndns.org/ |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Format
------
RightSeparator ( text ; separator ; occurrence ; direction )
Parameters
----------
text - any text expression or text field.
separator - any text expression or text field representing the set of characters you want to find.
occurrence - any numeric expression or field containing a number, representing which instance of the text string you want to find.
direction - 0 to count from right, 1 or greater to count from left.
Data type returned
----------------
text
Description
----------
Returns the characters in text counting from the right to the specified occurrence of the separator. The direction parameter determines
if the specified occurrence is counted from the left or the right of text.
Examples
--------
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 1 ; 0 ) returns ccc
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 2 ; 0 ) returns bbb:ccc
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 3 ; 0 ) returns ""
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 1 ; 1 ) returns bbb:ccc
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 2 ; 1 ) returns ccc
RightSeparator ( "aaa:bbb:ccc" ; ":" ; 3 ; 1 ) returns ""
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.