You are here

function _geshifilter_whitespace_explode in GeSHi Filter for syntax highlighting 5.2

Same name and namespace in other branches
  1. 6 geshifilter.inc \_geshifilter_whitespace_explode()
  2. 7 geshifilter.inc \_geshifilter_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.

2 calls to _geshifilter_whitespace_explode()
_geshifilter_filter_tips in ./geshifilter.filtertips.inc
Implementation for geshifilter_filter_tips()
_geshifilter_parse_attributes in ./geshifilter.pages.inc
Helper function for parsing the attributes of GeSHi code tags to get the settings for language and line numbers.

File

./geshifilter.inc, line 149

Code

function _geshifilter_whitespace_explode($string) {
  return preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);
}