<?php

namespace SEOAIC\helpers;

class StringHelpers
{
    /**
     * Replace newline with a single space in a string
     * @param string $content String
     * @return string
     */
    public static function nl2space(string $content): string
    {
        $remove = array("\r\n", "\n\r", "\n", "\r", "<br>", "<br />", "<br/>");
        $content = str_replace($remove, ' ', $content);

        return $content;
    }
}
