compares at most n characters of string s to string t; return <0 is s< t, 0 if s==t, or >0 if s>t.