INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Feature Request: Update unswap()  (Read 229 times)

markf2748

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 695
Feature Request: Update unswap()
« on: June 28, 2023, 08:59:55 pm »

Request:  Add an optional parameter to govern whether an unswapped suffix is returned with or without a preceding comma, for example:

unswap(Davis/, Sammy/, Jr., 0) ==> Sammy Davis, Jr. (default)
unswap(Davis/, Sammy/, Jr., 1) ==> Sammy Davis Jr.

(where '/' escapes the commas in a manually entered string.  As usual for MC functions, '/' would not be used with a string field argument.)

I suggest 0 as the default style since this is probably the most common use case (though it is not necessarily the case for Sammy Davis Jr.).

For a semi-colon separated list argument, a single trailing parameter would apply to all members of the list.  Otherwise, each list member can have its own parameter. If there are no parameters then return all in the default style.

Update 6/30/2023:
(1) unswap() is Currently broken:   unswap(Davis/, Sammy/, Jr.) ==> Sammy, Davis Jr. [wrong]
(2) Want the same optional outputs for unswap(Davis/, Sammy Jr., <option>) i.e. when the input string has no comma preceding a suffix.

Update 7/6/2023:
 "comma" used to be the most common unswapped usage, but modern styles tend to omit it, sometimes even when the owner includes it (reportedly the case for AP style; APA style 7th ed.; AMA style; Chicago MOS).  The issue is debatable.  Therefore "no comma" can be the default for unswap(), simply defined as the modern style used within MC.  If there is no option for it, the "comma" case can be entered manually when desired (to respect artist) for an unswapped name.

For output of swap(), the comma preceding a suffix should definitely appear in all cases, as in MC's new version of swap().

Win 11 Pro 64-bit   MC 31.0.29
Logged
Pages: [1]   Go Up