add a utility function for cutting strings ;) refs #21