EliminatePrefix ( value; prefix )
Rate this function: Average rating: 2.8 (6 votes) Discuss this Custom Function
Martin Brunner, Zurich Financial Services
http://www.zurichconnect.ch
Recursively eliminate any prefixes
Sample Input:
| EliminiatePrefix (00000254058 ; 0 ) |
|
Sample Output:
|
Description:
This function can be used, if it is not clear, how many times a certain prefix exists in front of a certain value. The function recursively eliminates the specified prefix.
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
Bin2Hex ( binary ) |
| |
(Sat, Mar 13, 10:08pm) |
| 2. |
SlideView (text) |
| |
(Sat, Mar 13, 8:40pm) |
| 3. |
HashFNV1a64 ( text ; empty ) |
| |
(Sat, Mar 13, 6:23pm) |
| 4. |
HashFNV1a32 ( text ; empty ) |
| |
(Sat, Mar 13, 5:55pm) |
| 5. |
XORbin( bin0 ; bin1 ; "" ) |
| |
(Sat, Mar 13, 4:35pm) |
| 6. |
cfMatch ( value_to_test; match_Value; match_operator ) |
| |
(Thu, Mar 11, 10:45pm) |
| 7. |
DeleteMiddleText ( Value ; StringStart ; StringEnd ) |
| |
(Wed, Mar 10, 8:27am) |
| 8. |
Codify( theText; code_option ) |
| |
(Sun, Mar 07, 8:17pm) |
 |
|
You can do the same thing with a simple, non-recursive calculation =
Let ( [
clean = Substitute ( text ; prefix ; "" ) ;
pos = Position ( text ; Left ( clean ; 1 ) ; 1 ; 1 )
] ;
Right ( text ; Length ( text ) - pos + 1 )
)
comment, VR
August 26, 2009 5:40pm