Text.RemoveNewLine
------------------

Removes newline characters from string.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [2.4](newinversion24.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.RemoveNewLine"; Text ) 

**MBS**( **"Text.RemoveNewLine";** /\* Removes newline characters from string. \*/  
**$Text**) /\* The text to process.e.g. "Hello World" \*/ 

(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](WebViewRunJavaScriptReturnTitle.md). An older version of Internet Explorer made trouble with newline characters inside javascript text, so we removed them.  
  
This function works on pure text, so any text style is lost.  
### Examples

Remove newlines from field

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

- [Text.ReplaceNewLine](TextReplaceNewLine.md)
- [WebView.RunJavaScript](WebViewRunJavaScript.md)
- [WebView.RunJavaScriptReturnTitle](WebViewRunJavaScriptReturnTitle.md)

### Blog Entries

- [MonkeyBread Software Releases the MBS Filemaker plug-in in version 2.4](https://www.mbsplugins.de/archive/2011-10-11/MonkeyBread_Software_Releases_/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin 2.4 release notes](https://www.mbsplugins.de/archive/2011-10-11/MBS_Filemaker_Plugin_24_releas/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.4pr5](https://www.mbsplugins.de/archive/2011-06-11/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2011, Seite 55](https://filemaker-magazin.de/neuigkeit/3506-Appetithappen-FMM_201105-06)

This function checks for a license.

Created 18th August 2014 , last changed 28th January 2022

  
[Text.RemoveControlCharacters](TextRemoveControlCharacters.md) - [Text.RemovePostfix](TextRemovePostfix.md)

[HTML Version](TextRemoveNewLine.shtml)