Searcher



( ZN >= 1.0.0 )

It is a tool created to search within any data.

 

 

# Methods


Mixed data ( Mixed $ searchData , Mixed $ searchWord , String $ output = 'bool' )

 

 

# Data ( ZN >= 4.0.1 )


Used to search within a string or array.

Parameters

Mixed $ data The data to be searched. Can be array or string.
Mixed $ search The data to be searched.
String $ type = 'boolean' Result type.
boolean The search result returns a logical value. True or false.
position The search result returns the position index of the found data .
string The search result returns the name of the found data .
return Mixed

uses

\Output::writeLine( Searcher::data(['a', 'b'], 'b') );
\Output::writeLine( Searcher::data(['a', 'b'], 'b', 'position') );
\Output::writeLine( Searcher::data(['a', 'b'], 'b', 'string') );
1
1
\Output::writeLine( Searcher::data('Example Data', 'Example') );
\Output::writeLine( Searcher::data('Example Data', 'Example', 'position') );
\Output::writeLine( Searcher::data('Example Data', 'Example', 'string') ); 
1
0
Example Data