substring hasing test