[TYPO3-core] replaceString and other changes

Franz Holzinger franz at fholzinger.com
Mon Mar 6 07:53:22 CET 2006


Hello Martin,

>  
>
>>- Add a 3rd parameter to the "|"-explode so that you are sure there
>>are always only two arguments.
>>    
>>
>
>
>Ok. Note: the toStr may contain a | now.
>
>
>  
>
>>- The function needs to be documented in "doc_core_ts", please don't
>>forget to send a suggestion.
>>    
>>
>
>
>replaceString:
>Replaces the first string with the second string (separated by a |) in the existing value.
>
>To the list of examples add this:
>
>myObject = TEXT
>myObject.value = The quick brown fox jumps over the lazy dog.
>myObject.value := removeString( quick)
>myObject.value := replaceString(lazy,sleeping)
>
>myObject.value = The brown fox jumps over the sleeping dog.
>
>Buuut, I have another idea. Replace addString with appendstring. Why? So we can have a prependString as well!
>
>  
>
You can put an additional parameter to addString. E.g. 0 as default for
the normal behaviour and 1 for the adding at the front of the string.
And someone wants it to be added somewhere inside of the left value. And
the maximum number of characters that will be added might be needed also.

Or for replaceString the maxmum number of characters might be needed too,


Greets,

Franz














More information about the TYPO3-team-core mailing list