Remove newlines from the given string and return it
Usage
// basic usage
$string = $sanitizer->removeNewlines(string $str);
// usage with all arguments
$string = $sanitizer->removeNewlines(string $str, string $replacement = ' ');
Arguments
Name | Type(s) | Description |
---|---|---|
str | string | String to remove newlines from |
replacement (optional) | string | Character to replace newlines with (default=" ") |
Return value
string
String without newlines
$sanitizer methods and properties
API reference based on ProcessWire core version 3.0.236