/functions/url_parser.php

Description

url_parser.php

This code provides various string manipulation functions that are used by the rest of the SquirrelMail code.

Functions
getEmail (line 214)

Parses a string and returns the first e-mail address found.

  • return: the first e-mail address found
string getEmail (mixed $string)
parseEmail (line 52)

Parses a body and converts all found email addresses to clickable links.

  • return: the number of unique addresses found
int parseEmail (mixed &$body)
parseUrl (line 109)

Parses a body and converts all found URLs to clickable links.

void parseUrl (mixed &$body)
replaceBlock (line 18)

Undocumented - complain, then patch.

void replaceBlock ( &$in,  $replace,  $start,  $end)
  • &$in
  • $replace
  • $start
  • $end
sq_strpos_8bit (line 246)

Finds first occurrence of 8bit data in the string

Function finds first 8bit symbol or html entity that represents 8bit character. Search start is defined by $offset argument. Search ends at $maxlength position. If $maxlength is not defined or bigger than provided string, search ends when string ends.

Check returned data type in order to avoid confusion between bool(false) (not found) and int(0) (first char in the string).

  • return: integer with first 8bit character position or boolean false
  • since: 1.5.2
mixed sq_strpos_8bit (string $haystack, [integer $offset = 0], [integer $maxlength = false])
  • string $haystack
  • integer $offset
  • integer $maxlength

Documentation generated on Sat, 07 Oct 2006 16:14:00 +0300 by phpDocumentor 1.3.0RC6