Elgg\CommitMessage::removeComments PHP Метод

removeComments() публичный статический Метод

Removes all lines that start with #
public static removeComments ( string $msg ) : string
$msg string The msg body of the commit
Результат string
    public static function removeComments($msg)
    {
        $msg_arr = array();
        foreach (explode("\n", rtrim($msg)) as $line) {
            if (substr($line, 0, 1) !== '#') {
                $msg_arr[] = $line;
            }
        }
        return implode("\n", $msg_arr);
    }