public static function indent($str, $with = '    ')
    {
        $newline = (substr($str, -1, 1) == "\n") ? "\n" : '';
        return $with . join("\n" . $with, self::lines($str)) . $newline;
    }
public static function indent($str, $with = '    ')
    {
        $newline = (substr($str, -1, 1) == "\n") ? "\n" : '';
        return $with . join("\n" . $with, self::lines($str)) . $newline;
    }
public static function indent ( $ str , $ with = '    ' ) { $ newline = ( substr ( $ str , - 1 , 1 ) == "\n" ) ? "\n" : '' ; return $ with . join ( "\n" . $ with , self :: lines ( $ str ) ) . $ newline ; }
Indent a string with the specified indent

@param string $str
@param string $with
@return string
Indent a string with the specified indent