[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 :
FALSE;
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.
Cheers
--
Francois Suter
Work: Cobweb Development Sarl - http://www.cobweb.ch
TYPO3: Help the project! - http://typo3.org/contribute/
Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/
More information about the TYPO3-team-core
mailing list