Added containsAsPrefix method and tests.