[TYPO3-core] GeneralUtility::inList() and spaces

François Suter fsu-lists at cobweb.ch
Wed Jul 10 12:15:09 CEST 2013

Hi Markus,

> I suggest to use "the middle way" and just do a trim() on the values, which still does the trick without RegExp.

That's what I thought too, but inList() doesn't explode the string. It 
just does:

return strpos(',' . $list . ',', ',' . $item . ',') !== FALSE ? TRUE : 

So again, exploding the string and trimming its components is much more 
work than using strpos(). I don't know what the performance impact could 
be, given that it's such a widespread method.



Francois Suter

Work: Cobweb Development Sarl - http://www.cobweb.ch

TYPO3: Help the project! - http://typo3.org/contribute/

Appreciate my work? Support me -

More information about the TYPO3-team-core mailing list