[TYPO3-core] RFC #9879: enable charlist for trim function in stdWrap
Martin Kutschker
masi-no at spam-typo3.org
Thu Dec 4 14:33:42 CET 2008
Dmitry Dulepov schrieb:
>
> Secondly, why force people to remember that \s means space? Not everyone is a PHP programmer.
While I agree, I want to note that \s is any whitespace not just a space
in a regexp. The backslash notation allows you to configure values that
are not (or at least not easily) entered otherwise.
Here's a syntax version without | but with a magic whitespace attriburte:
lib.fo = TEXT
lib.fo {
value = * Hello World *
trim = 1
trim.charList = *
trim.charList.trimWhiteSpace = 1
}
And here's yet another one where charList is a comma separated list and
any number is meant to be a code point (note that you have to use code
points if you want to trim number!):
lib.fo = TEXT
lib.fo {
value = * Hello World *
trim = 1
trim.charList = *,32
}
Masi
More information about the TYPO3-team-core
mailing list