public function formatString($string, $format) {

        $fmt = str_replace("_", "%s", $format);
        $str = str_split($string);

        return vsprintf($fmt, $str);
    }
public function formatString($string, $format) {

        $fmt = str_replace("_", "%s", $format);
        $str = str_split($string);

        return vsprintf($fmt, $str);
    }
public function formatString ( $ string , $ format ) { $ fmt = str_replace ( "_" , "%s" , $ format ) ; $ str = str_split ( $ string ) ; return vsprintf ( $ fmt , $ str ) ; }
Format a string.

@param string $string The string.
@param string $format The format.
@return string Returns the formatted string.
Format a string .