Class StringFunctions

Description

A library for manipulating strings

Located in /class.stringfunctions.php (line 22)


                
			
Method Summary
static string AfterLastOccurrenceOf (string $sString, string $sDelim)
static string FormatPHPCode (string $sCode)
static string ToPlural (string $sString)
static string ToSingular (string $sString)
Methods
static method AfterLastOccurrenceOf (line 122)

Returns a substring of the supplied string, starting after the last occurrence of the supplied delimiter.

  • return: The generated substring
  • access: public
static string AfterLastOccurrenceOf (string $sString, string $sDelim)
  • string $sString: The string we're generating a substring from
  • string $sDelim: The delimiter that we're searching for
static method FormatPHPCode (line 94)

Takes a string of PHP code and uses highlight_string() to syntax highlight the code, then explodes n each line and returns the code wrapped in a div with an ordered list, each line of code being a line in the ordered list to provide line numbers. It is up to the user to style this returned HTML.

  • return: The formatted PHP code
  • access: public
static string FormatPHPCode (string $sCode)
  • string $sCode: The string of PHP code to format
static method ToPlural (line 64)

Attempts to turn a supplied string, preferably an English, plural word, into the singular version of the string.

  • return: the result of attempting to make the word singular
  • access: public
static string ToPlural (string $sString)
  • string $sString: the plural word to attempt to make singular
static method ToSingular (line 32)

Attempts to turn a supplied string, preferably an English, singular word, into the plural version of the string.

  • return: the result of attempting to make the word plural
  • access: public
static string ToSingular (string $sString)
  • string $sString: the singular word to attempt to make plural

Documentation generated on Thu, 25 Feb 2010 15:59:41 -0500 by phpDocumentor 1.4.3