Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

Text.RemoveNewLine

Removes newline characters from string.

Component Version macOS Windows Linux Server iOS SDK
Text 2.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.RemoveNewLine"; Text )   More

(old name: String.RemoveNewLine)

Parameters

Parameter Description Example
Text The text to process. "Hello World"

Result

Text without newline characters.

Description

Removes newline characters from string.
FileMaker has a text replace command, but can't process all combinations of newline characters with it. As this function removes all newlines independent of whether you have CR, LF or CRLF in any combination.
We needed this for a client in combination with WebView.RunJavaScriptReturnTitle. An older version of Internet Explorer made trouble with newline characters inside javascript text, so we removed them.

Examples

Remove newlines from field

MBS( "Text.RemoveNewLine"; Test Database::TextField )

See also

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 29th April 2016


Text.RemoveControlCharacters - Text.RemovePostfix

Feedback: Report problem or ask question.