You are here: Re: [PHP] comparing two texts « PHP « IT news, forums, messages
Re: [PHP] comparing two texts

Posted by Robert Cummings on 10/20/49 11:19

On Wed, 2005-06-22 at 22:55, Richard Lynch wrote:
> On Sun, June 19, 2005 8:33 am, Robert Cummings said:
> > On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote:
> >> jenny mathew wrote:
> >> >>Untested, very crude:
> ^^^^^^^^^^
>
> > It's a bit of a dirty hack though. If I compare a 2 character text
> > against a 40k text, the error handler will be invoked (39998 * 3) times
> > if $text1 is the 2 byte string. That's extremely inefficient. I don't
> > think I've ever seen error suppression abused so badly to prevent
> > writing an extra line or 2 using isset().
>
> Don't you think I knew that when I typed it?
>
> What part of "very crude" did you not get?

Well some noobs might think crude works quite well for them :)

> Ya want me to do Jenny's work for her for free or what?! :-)

No but it seemed like Jenny did *grin*.

> The point was that depending on what Jenny wants for output, it could be
> pretty easy to compare two strings character by character.
>
> Or it could be incredibly difficult, if you need diff-like capabilities of
> recognizing similar lines of text interspersed with radically different
> lines of text.
>
> She obviously didn't like the "use diff" answer, so I gave her the yeast
> to roll her own.
>
> 'Course, she didn't like that either, but that's hardly my fault.
> [shrug]

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

 

Navigation:

[Reply to this 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

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