roundcubemail/program/lib/Roundcube/rcube_vcard.php
public static function vcard_quote($s, $sep = ';')
    {
        if (is_array($s)) {
            foreach ($s as $part) {
                $r[] = self::vcard_quote($part, $sep);
            }
            return(implode($sep, (array)$r));
        }

        return strtr($s, array('\\' => '\\\\', "\r" => '', "\n" => '\n', $sep => '\\'.$sep));
    }
public static function vcard_quote($s, $sep = ';')
    {
        if (is_array($s)) {
            foreach ($s as $part) {
                $r[] = self::vcard_quote($part, $sep);
            }
            return(implode($sep, (array)$r));
        }

        return strtr($s, array('\\' => '\\\\', "\r" => '', "\n" => '\n', $sep => '\\'.$sep));
    }
public static function vcard_quote ( $ s , $ sep = ';' ) { if ( is_array ( $ s ) ) { foreach ( $ s as $ part ) { $ r [ ] = self :: vcard_quote ( $ part , $ sep ) ; } return ( implode ( $ sep , ( array ) $ r ) ) ; } return strtr ( $ s , array ( '\\' => '\\\\' , "\r" => '' , "\n" => '\n' , $ sep => '\\' . $ sep ) ) ; }
Join indexed data array to a vcard quoted string

@param array Field data
@param string Separator

@return string Joined and quoted string
Join indexed data array to a vcard quoted string