Brian Dunning's FileMaker Custom Functions

TrimReturns ( text )

Trims leading and trailing paragraph returns.

  Average rating: 3.9 (51 votes) Log in to vote

Kieren MacMillan   Kieren MacMillan
kierencom
http://www.kierencom.ca

Share on Facebook Share on Twitter

  Sample input:
TrimReturns ( "

this

is the
text

" )
  Sample output:
this

is the
text

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

Trims leading and trailing paragraph returns, but could easily be modified to trim any other desired character(s), e.g., tab, space, period, etc.

 

Comments

Steve   Steve, Lancaster
Jul 12, 2014
Very nice and simply elegant. I tried for about an hour to do this....should've came here first! :)
Thanks for sharing.
 
João Coutinho   João Coutinho
Jun 19, 2019
Love the result :)
Thanks!
 
Robert D Trammel   Robert D Trammel, Lucky Penny LLC
Sep 8, 2023
Substitute( Trim( Substitute( ; "¶"; " " ) ); " "; "¶" ) works too! :)
 
Robert D Trammel   Robert D Trammel, Lucky Penny LLC
Sep 8, 2023
Substitute( Trim( Substitute( YourListHere ; "¶"; " " ) ); " "; "¶" )
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 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: