function _geshifilter_whitespace_explode in GeSHi Filter for syntax highlighting 6
Same name and namespace in other branches
- 5.2 geshifilter.inc \_geshifilter_whitespace_explode()
- 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, line numbers, etc.
File
- ./
geshifilter.inc, line 154 - General GeSHi filter helper functions.
Code
function _geshifilter_whitespace_explode($string) {
return preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);
}