function to test string prefix