/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 223)

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

  • return: the first e-mail address found
string getEmail (string $string)
  • string $string: string the string to process
parseEmail (line 54)

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

  • return: the number of unique addresses found
int parseEmail (string &$body)
  • string &$body: body the body to process, by ref
parseUrl (line 111)

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

void parseUrl (string &$body)
  • string &$body: body the body to process, by ref
replaceBlock (line 18)

Undocumented - complain, then patch.

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

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 Mon, 13 Jan 2020 04:23:43 +0100 by phpDocumentor 1.4.3