Re: comparing two texts

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

 



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

-- 
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