[plug] Clever little vegemites at work

Brian Tombleson brian at paradigmit.com.au
Tue Jan 15 19:01:01 WST 2002


From: "Leon Brooks" <leon at brooks.fdns.net>

> Google search for prices on a Sony DSC-F505 camera using the string:
>     dscf505 price
> Google's suggested alternative:
>    dsc f505 price
> How did it know where to break the string?
> Cheers; Leon

  $s = substr($s,0,length($s)/2) . " " . substr($s,(length($s)/2)+1) if
(length>5);

Obviously, I'm not a very good golfer, but I'd guess at a variation on this
basic algoritm.

- Brian.




More information about the plug mailing list