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

Posted by "Richard Lynch" on 10/20/21 11:19

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?

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

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]

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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