Completed checkpoint12 String functions