function _text_captcha_whitespace_explode in CAPTCHA Pack 8
Same name and namespace in other branches
- 5 text_captcha/text_captcha.inc \_text_captcha_whitespace_explode()
- 6 text_captcha/text_captcha.inc \_text_captcha_whitespace_explode()
- 7 text_captcha/text_captcha.inc \_text_captcha_whitespace_explode()
Helper function for splitting a string on white spaces.
Using explode(' ', $string) is not enough because it returns empty elements if $string contains consecutive spaces.
3 calls to _text_captcha_whitespace_explode()
- lost_character_process in text_captcha/
modules/ lost_character_captcha/ lost_character_captcha.module - Process the response before validation.
- _text_captcha_word_pool_get_content in text_captcha/
text_captcha.module - Helper function for getting the content of a word pool locale dependent.
- _text_captcha_word_pool_validate in text_captcha/
text_captcha.module - Helper function for validating the word pool locale dependent.
File
- text_captcha/
text_captcha.module, line 16 - Contains general functionality for the module.
Code
function _text_captcha_whitespace_explode($string) {
return preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);
}