Brian Dunning's FileMaker Custom Functions

TrimN ( text ; hitlist )

Removes any of a string of defined characters from leading/trailing positions on the supplied text

  Average rating: 4.6 (36 votes) Log in to vote

Ray Cologon   Ray Cologon
NightWing Enterprises
http://www.nightwing.com.au/FileMaker

Share on Facebook Share on Twitter

  Sample input:
TrimN ( " * Smile for the camera!¶" , "*!?.,: ¶" )
  Sample output:
Smile for the camera

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function allows you to define the characters which are to be trimmed from the supplied text on the fly. Thus you can selectively remove bullets, asterisks, elypses or other punctuation as well as leading/trailing numbers or whitespace.

There is no length limit on the hitlist, so the function can be used to selkectively strip a number of unwanted leading/trailing characters in one call.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.