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);
    }