bearophile <bearophileHUGS at lycos.com> wrote: >> auto s1 = replace(s, "lil", "li'l"); >> assert(s == "Mary has a lil lamb."); > > You probably meant: >> assert(s1 == "Mary has a lil lamb."); Nope. (s1 == "Mary has a li'l lamb.") && (s == "Mary has a lil lamb."). -- Simen