Comparison of string matching functions