Added helper function to get prefix of vector of strings