At 07:54 PM 8/30/2005 +0200, Fredrik Lundh wrote:
Phillip J. Eby wrote:
both split on a given token. partition splits once, and returns all three parts, while piece returns the part you ask for
No, because looking at that URL, there is no piece that is the token split on. partition() always returns 3 parts for 1 occurrence of the token, whereas $PIECE only has 2.
so "absolutely nothing in common" has now turned into "does the same thing but doesn't return the value you passed to it" ?
$PIECE returns exactly one value. partition returns exactly 3. partition always returns the separator as one of the three values. $PIECE never does. How many more differences does it have to have before you consider them to be nothing alike?
sorry for wasting my time.
And sorry for you being either illiterate or humor-impaired, to have missed the smiley on the sentence that said "absolutely nothing in common except having string arguments". You quoted it in your first reply, so it's not like it didn't make it into your email client.