Reply to Re: [PHP] Correcting contractions

Your name:

Reply:


Posted by Robert Cummings on 06/25/05 09:56

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. |
`------------------------------------------------------------'

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация