function _text_captcha_whitespace_explode in CAPTCHA Pack 5
Same name and namespace in other branches
- 8 text_captcha/text_captcha.module \_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_captcha_captcha in text_captcha/
lost_character_captcha/ lost_character_captcha.module - Implementation of hook_captcha().
- _text_captcha_word_pool_get_content in text_captcha/
text_captcha.inc - Helper function for getting the content of a word pool Locale dependent
- _text_captcha_word_pool_validate in text_captcha/
text_captcha.inc - Helper function for validating the word pool Locale dependent
File
- text_captcha/
text_captcha.inc, line 8
Code
function _text_captcha_whitespace_explode($string) {
return preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);
}