TrimCR ( )

Function stats

Average user rating
5.0000
132
185
9999
Support
FileMaker 7.0 +
Date posted
14 January 2009
Version
1
Recursive function
No

Author Info
 Charlie

7 functions

Average Rating 4.7

author_avatar



 

Function overview

Prototype

TrimCR  ( pText )


Parameters

pText  Text to trim. This can be any text expression or text field.


Description

Tags:  trim   carriage return  

Returns text stripped of all leading and trailing carriage returns.

Examples

Sample input

TrimCR( "¶¶¶filemaker¶¶¶¶" )


Sample output

filemaker

 

Function code

Let(
_delimiter = "::::$$$::::" ;

Substitute( Trim( Substitute( pText ; [ " " ; _delimiter ] ; [ ¶ ; " " ] ) ) ; [ " " ; ¶ ] ; [ _delimiter ; " " ] )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/185

    Prototype: TrimCR( pText )
    Function Author: Charlie (http://www.fmfunctions.com/mid/132)
    Last updated: 14 January 2009
    Version: 1

*/
// ===================================

 

Comments

Fabrice
14 January 2009



Most needed, and elegantly done. Thanks
  General comment