[TYPO3-core] RFC: EM: inconsistent line ending while saving ext_emconf.php

Michael Stucki michael at typo3.org
Wed Jan 24 14:27:01 CET 2007


Hi Dmitry,

> Ingmar Schlecht wrote:
> > Dmitry Dulepov wrote:
> >> +		return preg_replace('/\r/', '', $code);
> >
> > Looks good, but wouldn't a simple str_replace() do just as well here?

I agree.

> May be... I just used to regular expressions, so automatically use them
> if I can... So it should be:
>
> +		return str_replace(chr(13), '', $code);
>
> Right?

As long as you are using double quotes, it will still work with the backslash:

+		return str_replace("\r", '', $code);

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/20070124/a31b0e71/attachment.pgp 


More information about the TYPO3-team-core mailing list