Dear Jack,

That's in substance what I said.

But you see it obviously lead to some debate among developpers.

Nevertheless, if you agree our PoV (or Howard's) you can't say the function is really consistent as provided.

You said :

"Logically if you search for nothing you will find what you are searching for."

Uh oh ! That was the meanin' of my first post : "Nothing is in Everything". But we are programmers, we don't "search for nothing", we search for the "null string" and as far as I know in a programming language the Null String is not 'nothing', it's not the 'no code' character.

As a programmer, I don't expect from a function to answer :
"Oh you lazy boy, you're lookin' for nothin' so here's my answer : you win, and first try !"
where first try would lead me to "A" or "Z" ...

"Furthermore since you found something it must be somewhere. Logically it was in the first place you looked. Logically I think the function is consistent."

I already have heard this (Hey Lonkero !) ... But why should the first place we look, be the number "1" ? Especially concerning the Null String, the first place we have to look, is before the first char., where there's nothing as we all agree ... Returnin' "1" is not consistent. "1" is the position of the "A", and even if we all agree the element "nothing" is in every set, I've never been told that the element "nothing" was in all element of the set ! That's, I think another common confusion.

"Consider the point if you search for a null string in a null string"
Yes, there is strict identity between these values, but what's the lenghth of the null string ? Would it really have sense to return "1" where length is "0" ?
So, I would like a returned value of -2.

"But consistency is not everything," sure, that's why I like Neural Networks so much.

"I think the thrust of Howard's comments is that in this case usefulness might be a better criteria than logic. I tend to agree with Howard"

So Do I, But His Rate Is Already At Max. [Big Grin]