Brian Dunning's FileMaker Custom Functions

WrapText ( text ; width )

Wraps a text string to a maximum line width (number of characters)

  Average rating: 4.1 (14 votes) Log in to vote

Andy Smith   Andy Smith - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
WrapText (
  Sample output:
Some moderately long sentence that needs to be wrapped to a shorter line width

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

I needed to wrap the output of a templated html email to a maximum line length, so I came up with this.

In short it wraps any lines longer than a certain width, breaking at space characters. Be aware that words longer than the specified width will break across lines.

I intend to add some test shortly. Please let me know if you come across any issues.

 

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.

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: