Skip to content
Permalink
0.0.1-alpha
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
21 lines (17 sloc) 372 Bytes
<?php
namespace Rubix\Engine\Transformers\Tokenizers;
class WordTokenizer implements Tokenizer
{
/**
* Tokenize a string.
*
* @param string $string
* @return array
*/
public function tokenize(string $string) : array
{
$tokens = [];
preg_match_all('/\w\w+/u', $string, $tokens);
return $tokens[0];
}
}