Added a string partition function to utils.