[TYPO3-core] replaceString and other changes

Martin Kutschker Martin.Kutschker at blackbox.net
Sun Mar 5 11:43:57 CET 2006


Hi!

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.

* 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(). *

* 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.

Masi

* If the trim has to staty than i want argument quoting with ". 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 3153 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060305/192ec1f8/attachment.obj 


More information about the TYPO3-team-core mailing list