A template for string_hash