Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

Text.RemoveNewLine

Removes newline characters from string.

Component: Text
Version: 2.4
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "Text.RemoveNewLine"; Text )

(old name: String.RemoveNewLine)

Parameters

Parameter Description Example value
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


Text.RemoveControlCharacters   -   Text.RemovePostfix

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Nachhilfe in Mendig