[TYPO3-core] RFC #9879: enable charlist for trim function in stdWrap
Dmitry Dulepov
dmitry at typo3.org
Thu Dec 4 14:21:02 CET 2008
Hi!
Steffen Kamper wrote:
> well, that would lead that a bit to absurdum (double trim).
What is the problem with double trim? Inner trim trims '|' characters and preserves spaces. Outer trim trims the content. It is very logical and simple. One single line of code and all is done.
> What if we allow specialChars like in regEx?
> \s = space
> \n = linebreak
> \t = tab
> etc
>
> so it's possible to only trim * without whitespace trim.
It means this simple functionality becomes more complex in both code and TS.
Firsts, it means more complex parsing for $conf['trim.']['charList']. Why is that necessary?
Secondly, why force people to remember that \s means space? Not everyone is a PHP programmer. | *| is familiar because exists in noTrimWrap. \s* is not familiar for non–PHP people. System should more simple and friendly, not complex and cryptic.
In fact, existing version of the patch allows space, tab and even line break (using ")" syntax). What's the point to make it more complex?
--
Dmitry Dulepov
TYPO3 core team
In the blog: http://typo3bloke.net/post-details/zend_debugger_goes_64_bit_on_mac_os_x/
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
More information about the TYPO3-team-core
mailing list