[Qt-interest] indexOf empty substring

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Wed Feb 4 05:14:26 CET 2009


Srikanth Bemineni wrote:
> I want to know why an indexof()  of an empty substring on a 
> string gives me 0.

Every string begins and ends with an empty string, and there is an empty
string between each pair of adjacent characters.  So an empty string can
be found anywhere you look for it.

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list