PHP Class TextAnalysis\Utilities\Text

Author: yooper (yooper)
ファイルを表示 Open project: yooper/php-text-analysis Class Usage Examples

Public Methods

Method Description
contains ( $haystack, $needle )
endsWith ( string $haystack, string $needle ) : boolean
findDate ( $string ) : mixed Find Date in a String
getAllSubStrings ( string $text ) : array Takes a string and produces all possible substrings
startsWith ( string $haystack, string $needle ) : boolean http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions

Protected Methods

Method Description
__construct ( )

Method Details

__construct() protected method

protected __construct ( )

contains() public static method

public static contains ( $haystack, $needle )

endsWith() public static method

public static endsWith ( string $haystack, string $needle ) : boolean
$haystack string
$needle string
return boolean

findDate() public static method

Find Date in a String
Author: Etienne Tremel
public static findDate ( $string ) : mixed
return mixed false if no date found else array: array( 'day' => 01, 'month' => 01, 'year' => 2012 )

getAllSubStrings() public static method

Takes a string and produces all possible substrings
public static getAllSubStrings ( string $text ) : array
$text string
return array

startsWith() public static method

http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions
public static startsWith ( string $haystack, string $needle ) : boolean
$haystack string
$needle string
return boolean