Re: Correcting contractions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2005-06-25 at 02:17, Burhan Khalid wrote:
> Dotan Cohen wrote:
> 
> > Ill I knew about, its I didn't. I didn't mean to put ill in there...
> > 
> > Should I enter each contraction twice (for the capitalization), or
> > should I try to do something smart so that the capitalization will
> > happen automatically. The 'I' contractions are special, I will deal
> > with those seperatly.
> 
> str_ireplace() is a case-insensitive version of str_replace

str_ireplace() is PHP5 only and so not necessarily a good option.
Additionally it won't work properly since it will normalize all
replacements into lower case which is not the desired outcome since
sentences beginning with foobar'd contractions should maintain their
capitalization.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux