added new function to str_utils to handle mask