Brian Dunning's FileMaker Custom Functions

TrimSpacesAndTabs ( text )

trims leading/trailing spaces and tabs

  Average rating: 4.4 (32 votes) Log in to vote

Joe Rovang   Joe Rovang - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
TrimSpacesAndTabs ( Char ( 9 ) & "sample text " )
  Sample output:
"sample text"

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

This function is an enhanced version of the native Trim() function; it trims not only leading/trailing spaces, but tabs as well.



Eric   Eric, SJSU
May 22, 2015
Appreciate having this worked out. :-)

Went through the logic, and it makes sense to me - find non-space non-tab endpoints and extract middle of string based on those.

Haven't looked at edge cases yet.

Had to add a closing paren for the If statement to get custom function to save.

Working fine in my particular application now.

Many Thanks!

Log in to post comments.


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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: