You are here

function _text_captcha_whitespace_explode in CAPTCHA Pack 7

Same name and namespace in other branches
  1. 8 text_captcha/text_captcha.module \_text_captcha_whitespace_explode()
  2. 5 text_captcha/text_captcha.inc \_text_captcha_whitespace_explode()
  3. 6 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/lost_character_captcha/lost_character_captcha.module
Process the response before validation.
_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);
}