Use helper function to make ucs2_from_str impl massively shorter