Lines Matching refs:string

94      * Get a HTML/XML element from a HTML string
97 * @param string $realname Element name (including namespace prefix if applicable)
98 * @param string $string HTML document
101 public static function get_element($realname, $string)
107 if (preg_match_all("/<($name)" . \SimplePie\SimplePie::PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
226 'scheme' => (string) $iri->scheme,
227 'authority' => (string) $iri->authority,
228 'path' => (string) $iri->path,
229 'query' => (string) $iri->query,
230 'fragment' => (string) $iri->fragment
262 * Converts a Windows-1252 encoded string to a UTF-8 encoded string
265 * @param string $string Windows-1252 encoded string
266 * @return string UTF-8 encoded string
268 public static function windows_1252_to_utf8($string)
272 return strtr($string, $convert_table);
276 * Change a string from one encoding to another
278 * @param string $data Raw data in $input encoding
279 * @param string $input Encoding of $data
280 * @param string $output Encoding you want
281 * @return string|boolean False if we can't convert it
358 * @param string $data
359 * @param string $input
360 * @param string $output
361 * @return string|false
376 * @param string $charset Character set to standardise
377 * @return string Standardised name
1708 * @param string $data Data to strip comments from
1709 * @return string Comment stripped string
1735 * @param string $data Input data
1736 * @return string Output data
1749 * @param string $data Data to strip comments from
1750 * @return string Comment stripped string
1752 public static function uncomment_rfc822($string)
1754 $string = (string) $string;
1756 $length = strlen($string);
1761 while ($position < $length && ($pos = strpos($string, '(', $position)) !== false) {
1762 $output .= substr($string, $position, $pos - $position);
1764 if ($string[$pos - 1] !== '\\') {
1767 $position += strcspn($string, '()', $position);
1768 if ($string[$position - 1] === '\\') {
1771 } elseif (isset($string[$position])) {
1772 switch ($string[$position]) {
1790 $output .= substr($string, $position);
1877 public static function is_isegment_nz_nc($string)
1879 return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string);
1882 public static function space_separated_tokens($string)
1885 $string_length = strlen($string);
1887 $position = strspn($string, $space_characters);
1891 $len = strcspn($string, $space_characters, $position);
1892 $tokens[] = substr($string, $position, $len);
1894 $position += strspn($string, $space_characters, $position);
1905 * @return string UTF-8 character
1933 * @param string $str The input string.
1957 * @param string $data XML data
2113 * Get the default user agent string
2115 * @return string
2171 * @param string $url the URL to sanitize.
2172 * @return string the same URL without HTTP credentials.