Assuming lastnameparts is required, the following result was found.
= {"Mc", "O'", "D'", "I'"}; // // deal with double barrelled surnames l_FormattedLastName = List(); l_LastNameParts = v_LastName.toList("-"); for each v_LastNamePart in l_LastNameParts { // // default to proper v_LastNamePart = v_LastNamePart.proper();...