[TYPO3-core] replaceString and other changes
Michael Stucki
michael at typo3.org
Sun Mar 5 12:18:03 CET 2006
Hi Martin,
> I have changed the new := code. While implementing replaceString I noticed
> several issues.
>
> * The original code has one preg_match and two preg_replaces (why?), where
> I think only one preg_match is needed.
You are right, I didn't spend too much time to think about improving this.
> * addString and removeString have their arguments trimmed. This deafets the
> whole purpose of the brackets. If I write addString( some string), I most
> likely want the space at the beginning. This was ever so dull in TS that
> you could not add spaces easily. So I have removed the trim(). *
OK.
> * addString and friends are not operators but functions (+ is an operator,
> := is an operator as well). I made (superfluos) changes in the naming of
> the internal variables to reflect this.
OK.
> * If the trim has to staty than i want argument quoting with ".
It doesn't need to stay.
Comments about "replaceString":
- Add a 3rd parameter to the "|"-explode so that you are sure there are always
only two arguments.
- The function needs to be documented in "doc_core_ts", please don't forget to
send a suggestion.
After all I like your changes. +1 for the patch.
- michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060305/fe623848/attachment.pgp
More information about the TYPO3-team-core
mailing list