Case Convert R←{X}(819⌶)Y

Converts character data in Y to upper or lower-case. This function is considerably faster than any comparable function coded in APL, especially on nested arrays.

This function is Unicode only and is not available in the Classic variants of Dyalog.

Y may be any array of arbitrary depth so long as all the elements are characters.

The optional left-argument X is 0 (convert to lower-case) or 1 (convert to upper-case). If omitted, the default is 0.

The result R has the same structure as Y but each character element is case folded to upper or lower case.

Characters are converted per the default case mappings specified by The Unicode Consortium, described at:

 ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html

and using the table at:

 http://unicode.org/Public/UNIDATA/UnicodeData.txt

If conversion is being used to do case-insensitive character comparisons then converting everything to lower case is generally preferable to converting everything to upper. This is because converting to lower case can be faster.

Examples

      (819⌶) 'How many Roads must a man walk down'
how many roads must a man walk down
      1 (819⌶) 'How many Roads must a man walk down'
HOW MANY ROADS MUST A MAN WALK DOWN

      data←1000⍴⊂'Hello there.'
      lc_data←819⌶ data
      4↑lc_data
 hello there.  hello there.  hello there.  hello there.