[latex3-commits] [git/LaTeX3-latex3-latex3] l3text: Move \char/\str_<thing>_case functions to new names (764337863)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Nov 27 12:57:35 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : l3text
Link       : https://github.com/latex3/latex3/commit/7643378639d050d714900f630e751f48cebc8e10

>---------------------------------------------------------------

commit 7643378639d050d714900f630e751f48cebc8e10
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 27 11:57:03 2019 +0000

    Move \char/\str_<thing>_case functions to new names
    
    Moving to <thing>case: see upcoming changes.
    
    One or two changes will be backed out later.


>---------------------------------------------------------------

7643378639d050d714900f630e751f48cebc8e10
 l3experimental/l3graphics/l3graphics.dtx |  4 +-
 l3kernel/CHANGELOG.md                    | 10 +++++
 l3kernel/doc/l3obsolete.txt              | 14 +++++++
 l3kernel/l3candidates.dtx                | 70 +++++++++++++++++---------------
 l3kernel/l3deprecation.dtx               | 49 ++++++++++++++++++++++
 l3kernel/l3fp-parse.dtx                  |  2 +-
 l3kernel/l3str.dtx                       | 50 +++++++++++------------
 l3kernel/l3unicode.dtx                   | 16 ++++----
 l3kernel/testfiles/m3char001.luatex.tlg  |  4 +-
 l3kernel/testfiles/m3char001.lvt         | 20 ++++-----
 l3kernel/testfiles/m3char001.ptex.tlg    |  4 +-
 l3kernel/testfiles/m3char001.tlg         |  4 +-
 l3kernel/testfiles/m3char001.uptex.tlg   |  4 +-
 l3kernel/testfiles/m3char001.xetex.tlg   |  4 +-
 l3kernel/testfiles/m3str002.lvt          | 24 +++++------
 l3packages/xparse/xparse.dtx             |  2 +-
 l3trial/xfont/xfss.dtx                   |  6 +--
 17 files changed, 182 insertions(+), 105 deletions(-)

diff --git a/l3experimental/l3graphics/l3graphics.dtx b/l3experimental/l3graphics/l3graphics.dtx
index 8deb2335e..38d315580 100644
--- a/l3experimental/l3graphics/l3graphics.dtx
+++ b/l3experimental/l3graphics/l3graphics.dtx
@@ -577,7 +577,7 @@
     \exp_args:Ne \@@_include_auxi:n
       {
         \exp_args:Ne \str_tail:n
-          { \str_fold_case:V \l_@@_ext_str }
+          { \str_foldcase:V \l_@@_ext_str }
       }
   }
 \cs_new_protected:Npn \graphics_include:nn #1#2
@@ -587,7 +587,7 @@
       \file_get_full_name:nNTF {#1} \l_@@_name_tl
         {
           \exp_args:Ne \@@_include_auxi:n
-            { \str_fold_case:n {#1} }
+            { \str_foldcase:n {#1} }
         }
         { \__kernel_msg_error:nnn { graphics } { graphic-not-found } {#1} }
     \group_end:
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 96a06f4d2..b3ccfeda6 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,11 +9,21 @@ this project uses date-based 'snapshot' version identifiers.
 
 ### Added
 - `\file_hex_dump:n(nn)` and `\file_get_hex_dump:n(nn)N(TF)`
+- `\str_foldcase:n`
+- `\str_lowercase:n`
+- `\str_uppercase:n`
 
 ### Changed
 - Distribute LaTeX3 News
 - Moved `\char_codepoint_to_bytes:n` to stable
 
+### Deprecated
+- `\str_fold_case:n`,
+- `\str_lower_case:n`
+- `\str_upper_case:n`
+
+### Removed
+
 ## [2019-11-07]
 
 ### Fixed
diff --git a/l3kernel/doc/l3obsolete.txt b/l3kernel/doc/l3obsolete.txt
index 8706c0aba..e8eebb356 100644
--- a/l3kernel/doc/l3obsolete.txt
+++ b/l3kernel/doc/l3obsolete.txt
@@ -47,6 +47,14 @@ Function                   Expires end
 \c_one_thousand                   2019
 \c_ten_thousand                   2019
 \c_term_ior                       2020
+\char_fold_case:N                 2021
+\char_lower_case:N                2021
+\char_mixed_case:N                2021
+\char_upper_case:N                2021
+\char_str_fold_case:N             2021
+\char_str_lower_case:N            2021
+\char_str_mixed_case:N            2021
+\char_str_upper_case:N            2021
 \etex_....:D                      2019
 \hbox_unpack_clear:c              2020
 \hbox_unpack_clear:N              2020
@@ -63,10 +71,16 @@ Function                   Expires end
 \str_case_x:nnF                   2019
 \str_case_x:nnT                   2019
 \str_case_x:nnTF                  2019
+\str_fold_case:n                  2021
+\str_fold_case:V                  2021
 \str_if_eq_x:nnF                  2019
 \str_if_eq_x:nnT                  2019
 \str_if_eq_x:nnTF                 2019
 \str_if_eq_x_p:nn                 2019
+\str_lower_case:f                 2021
+\str_lower_case:n                 2021
+\str_upper_case:f                 2021
+\str_upper_case:n                 2021
 \tl_gset_from_file:cnn            2020
 \tl_gset_from_file:Nnn            2020
 \tl_gset_from_file_x:cnn          2020
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index f5d1d53fb..272ba9a3f 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -554,8 +554,8 @@
 %
 %   Importantly, notice that these functions are intended for working with
 %   user text for typesetting. For case changing programmatic data see the
-%   \pkg{l3str} module and discussion there of \cs{str_lower_case:n},
-%   \cs{str_upper_case:n} and \cs{str_fold_case:n}.
+%   \pkg{l3str} module and discussion there of \cs{str_lowercase:n},
+%   \cs{str_uppercase:n} and \cs{str_foldcase:n}.
 % \end{function}
 %
 % The functions perform expansion on the input in most cases. In particular,
@@ -848,15 +848,15 @@
 %   (\enquote{active}), and character code $32$ (space).
 % \end{variable}
 %
-% \begin{function}[added = 2018-04-06, updated = 2019-05-03, EXP]
+% \begin{function}[added = 2019-11-26, EXP]
 %   {
-%     \char_lower_case:N, \char_upper_case:N,
-%     \char_mixed_case:N, \char_fold_case:N,
-%     \char_str_lower_case:N, \char_str_upper_case:N,
-%     \char_str_mixed_case:N, \char_str_fold_case:N,
+%     \char_lowercase:N, \char_uppercase:N,
+%     \char_titlecase:N, \char_foldcase:N,
+%     \char_str_lowercase:N, \char_str_uppercase:N,
+%     \char_str_titlecase:N, \char_str_foldcase:N,
 %   }
 %   \begin{syntax}
-%     \cs{char_lower_case:N} \meta{char}
+%     \cs{char_lowercase:N} \meta{char}
 %   \end{syntax}
 %   Converts the \meta{char} to the equivalent case-changed character
 %   as detailed by the function name (see \cs{str_fold_case:n}
@@ -1549,8 +1549,8 @@
 %
 % \begin{macro}[EXP]
 %   {
-%     \char_lower_case:N, \char_upper_case:N,
-%     \char_mixed_case:N, \char_fold_case:N
+%     \char_lowercase:N, \char_uppercase:N,
+%     \char_titlecase:N, \char_foldcase:N
 %   }
 % \begin{macro}[EXP]{\@@_change_case:nNN}
 % \begin{macro}[EXP]{\@@_change_case:nN}
@@ -1562,8 +1562,8 @@
 % \begin{macro}[EXP]{\@@_change_case_catcode:N}
 % \begin{macro}[EXP]
 %   {
-%     \char_str_lower_case:N, \char_str_upper_case:N,
-%     \char_str_mixed_case:N, \char_str_fold_case:N
+%     \char_str_lowercase:N, \char_str_uppercase:N,
+%     \char_str_titlecase:N, \char_str_foldcase:N
 %   }
 % \begin{macro}[EXP]{\@@_str_change_case:nNN}
 % \begin{macro}[EXP]{\@@_str_change_case:nN}
@@ -1571,7 +1571,7 @@
 %   First, see if the current character has a special mapping for the current
 %   transformation. If it does, insert that. Otherwise, use the \TeX{} data
 %   to look up the one-to-one mapping, and generate the appropriate character
-%   with the appropriate category code. Mixed case needs an extra step as it
+%   with the appropriate category code. Titlecase needs an extra step as it
 %   may be special-cased or might be a special upper case outcome. The internal
 %   when using non-Unicode engines has to be set up to only do anything
 %   with ASCII characters.
@@ -1582,27 +1582,27 @@
 %  grab each of them and case change them in reverse order to maintain
 %  \texttt{f}-type expandability.
 %    \begin{macrocode}
-\cs_new:Npn \char_lower_case:N #1
+\cs_new:Npn \char_lowercase:N #1
   { \@@_change_case:nNN { lower } \char_value_lccode:n #1 }
-\cs_new:Npn \char_upper_case:N #1
+\cs_new:Npn \char_uppercase:N #1
   { \@@_change_case:nNN { upper } \char_value_uccode:n #1 }
-\cs_new:Npn \char_mixed_case:N #1
+\cs_new:Npn \char_titlecase:N #1
   {
-    \tl_if_exist:cTF { c_@@_mixed_case_ \token_to_str:N #1 _tl }
+    \tl_if_exist:cTF { c_@@_titlecase_ \token_to_str:N #1 _tl }
       {
         \@@_change_case_multi:vN
-          { c_@@_mixed_case_ \token_to_str:N #1 _tl } #1
+          { c_@@_titlecase_ \token_to_str:N #1 _tl } #1
       }
-      { \char_upper_case:N #1 }
+      { \char_uppercase:N #1 }
   }
-\cs_new:Npn \char_fold_case:N #1
+\cs_new:Npn \char_foldcase:N #1
   { \@@_change_case:nNN { fold } \char_value_lccode:n #1 }
 \cs_new:Npn \@@_change_case:nNN #1#2#3
   {
-    \tl_if_exist:cTF { c_@@_ #1 _case_ \token_to_str:N #3 _tl }
+    \tl_if_exist:cTF { c_@@_ #1 case_ \token_to_str:N #3 _tl }
       {
         \@@_change_case_multi:vN
-          { c_@@_ #1 _case_ \token_to_str:N #3 _tl } #3
+          { c_@@_ #1 case_ \token_to_str:N #3 _tl } #3
       }
       { \exp_args:Nf \@@_change_case:nN { #2 { `#3 } } #3 }
   }
@@ -1676,22 +1676,22 @@
 %   Same story for the string version, except category code is easier
 %   to follow. This of course makes this version significantly faster.
 %    \begin{macrocode}
-\cs_new:Npn \char_str_lower_case:N #1
+\cs_new:Npn \char_str_lowercase:N #1
   { \@@_str_change_case:nNN { lower } \char_value_lccode:n #1 }
-\cs_new:Npn \char_str_upper_case:N #1
+\cs_new:Npn \char_str_uppercase:N #1
   { \@@_str_change_case:nNN { upper } \char_value_uccode:n #1 }
-\cs_new:Npn \char_str_mixed_case:N #1
+\cs_new:Npn \char_str_titlecase:N #1
   {
-    \tl_if_exist:cTF { c_@@_mixed_case_ \token_to_str:N #1 _tl }
-      { \tl_to_str:c { c_@@_mixed_case_ \token_to_str:N #1 _tl } }
-      { \char_str_upper_case:N #1 }
+    \tl_if_exist:cTF { c_@@_titlecase_ \token_to_str:N #1 _tl }
+      { \tl_to_str:c { c_@@_titlecase_ \token_to_str:N #1 _tl } }
+      { \char_str_uppercase:N #1 }
   }
-\cs_new:Npn \char_str_fold_case:N #1
+\cs_new:Npn \char_str_foldcase:N #1
   { \@@_str_change_case:nNN { fold } \char_value_lccode:n #1 }
 \cs_new:Npn \@@_str_change_case:nNN #1#2#3
   {
-    \tl_if_exist:cTF { c_@@_ #1 _case_ \token_to_str:N #3 _tl }
-      { \tl_to_str:c { c_@@_ #1 _case_ \token_to_str:N #3 _tl } }
+    \tl_if_exist:cTF { c_@@_ #1 case_ \token_to_str:N #3 _tl }
+      { \tl_to_str:c { c_@@_ #1 case_ \token_to_str:N #3 _tl } }
       { \exp_args:Nf \@@_str_change_case:nN { #2 { `#3 } } #3 }
   }
 \cs_new:Npn \@@_str_change_case:nN #1#2
@@ -1720,6 +1720,10 @@
 % \end{macro}
 %
 %    \begin{macrocode}
+\cs_new_eq:NN \char_mixedcase:N \char_titlecase:N
+%     \end{macrocode}
+%
+%    \begin{macrocode}
 %<@@=tl>
 %    \end{macrocode}
 %
@@ -2044,7 +2048,7 @@
     \cs_new:Npn \@@_change_case_char:nN #1#2
       {
         \@@_change_case_output:fwn
-          { \use:c { char_ #1 _case:N } #2 }
+          { \use:c { char_ #1 case:N } #2 }
       }
   }
   {
@@ -2062,7 +2066,7 @@
           }
           {
             \@@_change_case_output:fwn
-              { \use:c { char_ #1 _case:N } #2 }
+              { \use:c { char_ #1 case:N } #2 }
           }
        }
   }
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 410f6891a..e86be2d74 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -873,6 +873,28 @@
 %
 % \subsection{Deprecated \pkg{l3str} functions}
 %
+% \begin{macro}[EXP, deprecated = 2021-07-01]
+%   {
+%     \str_lower_case:n, \str_lower_case:f,
+%     \str_upper_case:n, \str_upper_case:f,
+%     \str_fold_case:n,  \str_fold_case:V
+%   }
+%    \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_lower_case:n }
+\cs_gset:Npn \str_lower_case:n { \str_lowercase:n }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_lower_case:f }
+\cs_gset:Npn \str_lower_case:f { \str_lowercase:f }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_upper_case:n }
+\cs_gset:Npn \str_upper_case:n { \str_uppercase:n }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_upper_case:f }
+\cs_gset:Npn \str_upper_case:f { \str_uppercase:f }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_fold_case:n }
+\cs_gset:Npn \str_fold_case:n { \str_foldcase:n }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_fold_case:V }
+\cs_gset:Npn \str_fold_case:V { \str_foldcase:V }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[EXP, deprecated = 2020-07-01, noTF]{\str_case_x:nn}
 % \begin{macro}[EXP, deprecated = 2020-07-01, pTF]{\str_if_eq_x:nn}
 %    \begin{macrocode}
@@ -978,6 +1000,33 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[EXP, deprecated = 2021-07-01]
+%   {
+%     \char_lower_case:N, \char_upper_case:N,
+%     \char_mixed_case:Nn, \char_fold_case:N,
+%     \char_str_lower_case:N, \char_str_upper_case:N,
+%     \char_str_mixed_case:Nn, \char_str_fold_case:N,
+%   }
+%    \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_lower_case:N }
+\cs_gset:Npn \char_lower_case:N { \char_lowercase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_upper_case:N }
+\cs_gset:Npn \char_upper_case:N { \char_uppercase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_mixed_case:N }
+\cs_gset:Npn \char_mixed_case:N { \char_titlecase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_fold_case:N }
+\cs_gset:Npn \char_fold_case:N { \char_foldcase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_lower_case:N }
+\cs_gset:Npn \char_str_lower_case:N { \char_str_lowercase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_upper_case:N }
+\cs_gset:Npn \char_str_upper_case:N { \char_str_uppercase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_mixed_case:N }
+\cs_gset:Npn \char_str_mixed_case:N { \char_str_titlecase:N }
+\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_fold_case:N }
+\cs_gset:Npn \char_str_fold_case:N { \char_str_foldcase:N }
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Deprecated \pkg{l3file} functions}
 %
 % \begin{macro}[EXP, deprecated = 2021-07-01]{\c_term_ior}
diff --git a/l3kernel/l3fp-parse.dtx b/l3kernel/l3fp-parse.dtx
index a86419053..e844cb21f 100644
--- a/l3kernel/l3fp-parse.dtx
+++ b/l3kernel/l3fp-parse.dtx
@@ -1025,7 +1025,7 @@
     \cs_if_exist_use:cF { @@_parse_word_#2:N }
       {
         \cs_if_exist_use:cF
-          { @@_parse_caseless_ \str_fold_case:n {#2} :N }
+          { @@_parse_caseless_ \str_foldcase:n {#2} :N }
           {
             \__kernel_msg_expandable_error:nnn
               { kernel } { unknown-fp-word } {#2}
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 09dde6a4e..ff3750cd6 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -690,14 +690,14 @@
 %
 % \section{String manipulation}
 %
-% \begin{function}[EXP, added = 2015-03-01]
+% \begin{function}[EXP, added = 2019-11-26]
 %    {
-%      \str_lower_case:n, \str_lower_case:f,
-%      \str_upper_case:n, \str_upper_case:f
+%      \str_lowercase:n, \str_lowercase:f,
+%      \str_uppercase:n, \str_uppercase:f
 %   }
 %   \begin{syntax}
-%     \cs{str_lower_case:n} \Arg{tokens}
-%     \cs{str_upper_case:n} \Arg{tokens}
+%     \cs{str_lowercase:n} \Arg{tokens}
+%     \cs{str_uppercase:n} \Arg{tokens}
 %   \end{syntax}
 %   Converts the input \meta{tokens} to their string representation, as
 %   described for \cs{tl_to_str:n}, and then to the lower or upper
@@ -716,8 +716,8 @@
 %         \cs_set_protected:cpn
 %           {
 %             user
-%             \str_upper_case:f { \tl_head:n {#1} }
-%             \str_lower_case:f { \tl_tail:n {#1} }
+%             \str_uppercase:f { \tl_head:n {#1} }
+%             \str_lowercase:f { \tl_tail:n {#1} }
 %           }
 %           { #2 }
 %       }
@@ -728,7 +728,7 @@
 %
 %   These functions should \emph{not} be used for
 %   \begin{itemize}
-%     \item Caseless comparisons: use \cs{str_fold_case:n} for this
+%     \item Caseless comparisons: use \cs{str_foldcase:n} for this
 %       situation (case folding is distinct from lower casing).
 %     \item Case changing text for typesetting: see the
 %       \cs[index=tl_lower_case:n]{tl_lower_case:n(n)},
@@ -740,7 +740,7 @@
 %
 %   \begin{texnote}
 %     As with all \pkg{expl3} functions, the input supported by
-%     \cs{str_fold_case:n} is \emph{engine-native} characters which are or
+%     \cs{str_foldcase:n} is \emph{engine-native} characters which are or
 %     interoperate with \textsc{utf-8}. As such, when used with \pdfTeX{}
 %     \emph{only} the Latin alphabet characters A--Z are case-folded
 %     (\emph{i.e.}~the \textsc{ascii} range which coincides with
@@ -749,10 +749,10 @@
 %   \end{texnote}
 % \end{function}
 %
-% \begin{function}[EXP, added = 2014-06-19, updated = 2016-03-07]
-%   {\str_fold_case:n, \str_fold_case:V}
+% \begin{function}[EXP, added = 2019-11-26]
+%   {\str_foldcase:n, \str_foldcase:V}
 %   \begin{syntax}
-%     \cs{str_fold_case:n} \Arg{tokens}
+%     \cs{str_foldcase:n} \Arg{tokens}
 %   \end{syntax}
 %   Converts the input \meta{tokens} to their string representation, as
 %   described for \cs{tl_to_str:n}, and then folds the case of the resulting
@@ -760,7 +760,7 @@
 %   left in the input stream.
 %
 %   String folding is a process used for material such as identifiers rather
-%   than for \enquote{text}. The folding provided by \cs{str_fold_case:n}
+%   than for \enquote{text}. The folding provided by \cs{str_foldcase:n}
 %   follows the mappings provided by the \href{http://www.unicode.org}^^A
 %   {Unicode Consortium}, who
 %   \href{http://www.unicode.org/faq/casemap_charprop.html#2}{state}:
@@ -773,7 +773,7 @@
 %     should be used solely for internal processing and generally should not be
 %     stored or displayed to the end user.
 %   \end{quote}
-%   The folding approach implemented by \cs{str_fold_case:n} follows the
+%   The folding approach implemented by \cs{str_foldcase:n} follows the
 %   \enquote{full} scheme defined by the Unicode Consortium
 %   (\emph{e.g.}~\SS folds to \texttt{SS}). As case-folding is
 %   a language-insensitive process, there is no special treatment of
@@ -782,7 +782,7 @@
 %
 %   \begin{texnote}
 %     As with all \pkg{expl3} functions, the input supported by
-%     \cs{str_fold_case:n} is \emph{engine-native} characters which are or
+%     \cs{str_foldcase:n} is \emph{engine-native} characters which are or
 %     interoperate with \textsc{utf-8}. As such, when used with \pdfTeX{}
 %     \emph{only} the Latin alphabet characters A--Z are case-folded
 %     (\emph{i.e.}~the \textsc{ascii} range which coincides with
@@ -1850,9 +1850,9 @@
 %
 % \begin{macro}[EXP]
 %   {
-%     \str_fold_case:n, \str_fold_case:V,
-%     \str_lower_case:n, \str_lower_case:f,
-%     \str_upper_case:n, \str_upper_case:f
+%     \str_foldcase:n, \str_foldcase:V,
+%     \str_lowercase:n, \str_lowercase:f,
+%     \str_uppercase:n, \str_uppercase:f
 %   }
 % \begin{macro}[EXP]{\@@_change_case:nn}
 % \begin{macro}[EXP]{\@@_change_case_aux:nn}
@@ -1867,12 +1867,12 @@
 %   and everything else. The output is detokenized to allow data sharing
 %   with text-based case changing.
 %    \begin{macrocode}
-\cs_new:Npn \str_fold_case:n  #1 { \@@_change_case:nn {#1} { fold } }
-\cs_new:Npn \str_lower_case:n #1 { \@@_change_case:nn {#1} { lower } }
-\cs_new:Npn \str_upper_case:n #1 { \@@_change_case:nn {#1} { upper } }
-\cs_generate_variant:Nn \str_fold_case:n  { V }
-\cs_generate_variant:Nn \str_lower_case:n { f }
-\cs_generate_variant:Nn \str_upper_case:n { f }
+\cs_new:Npn \str_foldcase:n  #1 { \@@_change_case:nn {#1} { fold } }
+\cs_new:Npn \str_lowercase:n #1 { \@@_change_case:nn {#1} { lower } }
+\cs_new:Npn \str_uppercase:n #1 { \@@_change_case:nn {#1} { upper } }
+\cs_generate_variant:Nn \str_foldcase:n  { V }
+\cs_generate_variant:Nn \str_lowercase:n { f }
+\cs_generate_variant:Nn \str_uppercase:n { f }
 \cs_new:Npn \@@_change_case:nn #1
   {
     \exp_after:wN \@@_change_case_aux:nn \exp_after:wN
@@ -1906,7 +1906,7 @@
     \quark_if_recursion_tail_stop_do:Nn #2
       { \@@_change_case_end:wn }
     \@@_change_case_output:fw
-      { \use:c { char_str_ #1 _case:N } #2 }
+      { \use:c { char_str_ #1 case:N } #2 }
     \@@_change_case_loop:nw {#1}
   }
 %    \end{macrocode}
diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index 9eb3d9747..8359aed61 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -133,7 +133,7 @@
             \cs_set_nopar:Npn \l_@@_tmpb_tl {#5}
             \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \l_@@_tmpb_tl
               \tl_const:cx
-                { c_@@_mixed_case_ \@@_generate_char:n {#1} _tl }
+                { c_@@_titlecase_ \@@_generate_char:n {#1} _tl }
                 { \@@_generate:n { "#7 } }
             \fi:
           \fi:
@@ -161,7 +161,7 @@
             \reverse_if:N \if_int_compare:w
               \char_value_lccode:n {"#1} = "#3 ~
               \tl_const:cx
-                { c_@@_fold_case_ \@@_generate_char:n {#1} _tl }
+                { c_@@_foldcase_ \@@_generate_char:n {#1} _tl }
                 { \@@_generate:n { "#3 } }
             \fi:
           \else:
@@ -172,7 +172,7 @@
         }
       \cs_set_protected:Npn \@@_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop
         {
-          \tl_const:cx { c_@@_fold_case_ \@@_generate_char:n {#1} _tl }
+          \tl_const:cx { c_@@_foldcase_ \@@_generate_char:n {#1} _tl }
             {
               \@@_generate:n { "#2 }
               \@@_generate:n { "#3 }
@@ -199,14 +199,14 @@
           \use:n { \@@_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop
           \use:n { \@@_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop
           \str_if_eq:nnF {#3} {#4}
-            { \use:n { \@@_data_auxii:w #1 ~ mixed ~ #3 ~ } ~ \q_stop }
+            { \use:n { \@@_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop }
         }
       \cs_set_protected:Npn \@@_data_auxii:w
         #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop
         {
           \tl_if_empty:nF {#4}
             {
-              \tl_const:cx { c_@@_ #2 _case_ \@@_generate_char:n {#1} _tl }
+              \tl_const:cx { c_@@_ #2 case_ \@@_generate_char:n {#1} _tl }
                 {
                   \@@_generate:n { "#3 }
                   \@@_generate:n { "#4 }
@@ -244,9 +244,9 @@
       \cs_set_protected:Npn \@@_tmp:NN #1#2
         {
           \quark_if_recursion_tail_stop:N #2
-          \tl_const:cn { c_@@_upper_case_ #2 _tl } {#1}
-          \tl_const:cn { c_@@_lower_case_ #1 _tl } {#2}
-          \tl_const:cn { c_@@_fold_case_  #1 _tl } {#2}
+          \tl_const:cn { c_@@_uppercase_ #2 _tl } {#1}
+          \tl_const:cn { c_@@_lowercase_ #1 _tl } {#2}
+          \tl_const:cn { c_@@_foldcase_  #1 _tl } {#2}
           \@@_tmp:NN
         }
       \@@_tmp:NN
diff --git a/l3kernel/testfiles/m3char001.luatex.tlg b/l3kernel/testfiles/m3char001.luatex.tlg
index 934105c3e..407df1204 100644
--- a/l3kernel/testfiles/m3char001.luatex.tlg
+++ b/l3kernel/testfiles/m3char001.luatex.tlg
@@ -500,7 +500,7 @@ the character A
 undefined
 ============================================================
 ============================================================
-TEST 9: \char_ <thing>_case:N
+TEST 9: \char_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the letter a).
@@ -584,7 +584,7 @@ The token list contains the tokens:
 l. ...    }
 ============================================================
 ============================================================
-TEST 10: \char_str_ <thing>_case:N
+TEST 10: \char_str_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the character a).
diff --git a/l3kernel/testfiles/m3char001.lvt b/l3kernel/testfiles/m3char001.lvt
index 08b641f56..e040817ce 100644
--- a/l3kernel/testfiles/m3char001.lvt
+++ b/l3kernel/testfiles/m3char001.lvt
@@ -172,16 +172,16 @@
 \OMIT
 \cs_gset_protected:Npn \test:N #1
   {
-    \exp_args:Nf \tl_analysis_show:n { \char_lower_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_upper_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_fold_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_mixed_case:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_lowercase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_uppercase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_foldcase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_titlecase:N #1 }
   }
 \TIMO
 
 \group_begin:
   \char_set_catcode_other:N Q
-  \TEST { \char_<thing>_case:N }
+  \TEST { \char_<thing>case:N }
     {
       \test:N A
       \test:N Z
@@ -194,16 +194,16 @@
 \OMIT
 \cs_gset_protected:Npn \test:N #1
   {
-    \exp_args:Nf \tl_analysis_show:n { \char_str_lower_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_str_upper_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_str_fold_case:N #1 }
-    \exp_args:Nf \tl_analysis_show:n { \char_str_mixed_case:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_str_lowercase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_str_uppercase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_str_foldcase:N #1 }
+    \exp_args:Nf \tl_analysis_show:n { \char_str_titlecase:N #1 }
   }
 \TIMO
 
 \group_begin:
   \char_set_catcode_other:N Q
-  \TEST { \char_str_<thing>_case:N }
+  \TEST { \char_str_<thing>case:N }
     {
       \test:N A
       \test:N Z
diff --git a/l3kernel/testfiles/m3char001.ptex.tlg b/l3kernel/testfiles/m3char001.ptex.tlg
index ab2284843..da822a222 100644
--- a/l3kernel/testfiles/m3char001.ptex.tlg
+++ b/l3kernel/testfiles/m3char001.ptex.tlg
@@ -535,7 +535,7 @@ the character A
 undefined
 ============================================================
 ============================================================
-TEST 9: \char_ <thing>_case:N
+TEST 9: \char_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the letter a).
@@ -701,7 +701,7 @@ The token list contains the tokens:
 l. ...    }
 ============================================================
 ============================================================
-TEST 10: \char_str_ <thing>_case:N
+TEST 10: \char_str_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the character a).
diff --git a/l3kernel/testfiles/m3char001.tlg b/l3kernel/testfiles/m3char001.tlg
index 457c6b750..15d83be3d 100644
--- a/l3kernel/testfiles/m3char001.tlg
+++ b/l3kernel/testfiles/m3char001.tlg
@@ -535,7 +535,7 @@ the character A
 undefined
 ============================================================
 ============================================================
-TEST 9: \char_ <thing>_case:N
+TEST 9: \char_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the letter a).
@@ -701,7 +701,7 @@ The token list contains the tokens:
 l. ...    }
 ============================================================
 ============================================================
-TEST 10: \char_str_ <thing>_case:N
+TEST 10: \char_str_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the character a).
diff --git a/l3kernel/testfiles/m3char001.uptex.tlg b/l3kernel/testfiles/m3char001.uptex.tlg
index ab2284843..da822a222 100644
--- a/l3kernel/testfiles/m3char001.uptex.tlg
+++ b/l3kernel/testfiles/m3char001.uptex.tlg
@@ -535,7 +535,7 @@ the character A
 undefined
 ============================================================
 ============================================================
-TEST 9: \char_ <thing>_case:N
+TEST 9: \char_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the letter a).
@@ -701,7 +701,7 @@ The token list contains the tokens:
 l. ...    }
 ============================================================
 ============================================================
-TEST 10: \char_str_ <thing>_case:N
+TEST 10: \char_str_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the character a).
diff --git a/l3kernel/testfiles/m3char001.xetex.tlg b/l3kernel/testfiles/m3char001.xetex.tlg
index 59a0bfb1b..4a6e83f97 100644
--- a/l3kernel/testfiles/m3char001.xetex.tlg
+++ b/l3kernel/testfiles/m3char001.xetex.tlg
@@ -500,7 +500,7 @@ the character A
 undefined
 ============================================================
 ============================================================
-TEST 9: \char_ <thing>_case:N
+TEST 9: \char_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the letter a).
@@ -584,7 +584,7 @@ The token list contains the tokens:
 l. ...    }
 ============================================================
 ============================================================
-TEST 10: \char_str_ <thing>_case:N
+TEST 10: \char_str_ <thing>case:N
 ============================================================
 The token list contains the tokens:
 >  a (the character a).
diff --git a/l3kernel/testfiles/m3str002.lvt b/l3kernel/testfiles/m3str002.lvt
index e74087aaa..8e37f81c6 100644
--- a/l3kernel/testfiles/m3str002.lvt
+++ b/l3kernel/testfiles/m3str002.lvt
@@ -13,11 +13,11 @@
 
 \TESTEXP { Simple~Latin~case~folding }
   {
-    " \str_fold_case:n { ABC ~ 123 ~ abc ~ !@ } "
+    " \str_foldcase:n { ABC ~ 123 ~ abc ~ !@ } "
     \NEWLINE
-    " \str_fold_case:n { ~ ABC ~ 123 ~ abc ~ !@ ~ } "
+    " \str_foldcase:n { ~ ABC ~ 123 ~ abc ~ !@ ~ } "
     \NEWLINE
-    " \str_fold_case:n { Some~$&#~odd~text~{~}~ } "
+    " \str_foldcase:n { Some~$&#~odd~text~{~}~ } "
   }
 
 \TEST { Checking~category~codes }
@@ -25,32 +25,32 @@
     \OMIT
       \tl_set:Nn \l_tmpa_tl { abc~123 }
     \TIMO
-    \tl_set:Nx \l_tmpb_tl{ \str_fold_case:n { ABC~123 } }
+    \tl_set:Nx \l_tmpb_tl{ \str_foldcase:n { ABC~123 } }
     \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl \ERROR \FALSE
     \OMIT
       \tl_set:Nx \l_tmpa_tl { \tl_to_str:n { abc~123 } }
     \TIMO
-    \tl_set:Nx \l_tmpb_tl{ \str_fold_case:n { ABC~123 } }
+    \tl_set:Nx \l_tmpb_tl{ \str_foldcase:n { ABC~123 } }
     \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl \TRUE \ERROR
   }
 \sys_if_engine_ptex:T { \END }
 \TESTEXP { Accented~characters,~etc. }
   {
-    " \str_fold_case:n { ĆėƊṐṑ } "
+    " \str_foldcase:n { ĆėƊṐṑ } "
     \NEWLINE
-    " \str_fold_case:n { ᾪωΝ } "
+    " \str_foldcase:n { ᾪωΝ } "
     \NEWLINE
-    " \str_fold_case:n { ΰῢst } "
+    " \str_foldcase:n { ΰῢst } "
     \NEWLINE
-    " \str_fold_case:n { Ꚉ ꚇ} "
+    " \str_foldcase:n { Ꚉ ꚇ} "
     \NEWLINE
-    " \str_fold_case:n { ZꝎⓍ } "
+    " \str_foldcase:n { ZꝎⓍ } "
   }
 
 \TEST { Characters~with~context-sensitive~Unicode~behaviour }
   {
-    \tl_set:Nx \l_tmpa_tl { \str_fold_case:n { όσος } }
-    \tl_set:Nx \l_tmpb_tl { \str_fold_case:n { ΌΣΟΣ } }
+    \tl_set:Nx \l_tmpa_tl { \str_foldcase:n { όσος } }
+    \tl_set:Nx \l_tmpb_tl { \str_foldcase:n { ΌΣΟΣ } }
     \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl \TRUE \FALSE
   }
 
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 2a0b842fb..a74fedc92 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -4551,7 +4551,7 @@
     LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
   }
 \__kernel_msg_new:nnnn { xparse } { non-xparse }
-  { \str_upper_case:n #1~not~defined~using~xparse. }
+  { \str_uppercase:n #1~not~defined~using~xparse. }
   {
     You~have~asked~for~the~argument~specification~for~the~#1,~
     but~this~was~not~defined~using~xparse.
diff --git a/l3trial/xfont/xfss.dtx b/l3trial/xfont/xfss.dtx
index 543a9bcb7..2b9c36ad2 100644
--- a/l3trial/xfont/xfss.dtx
+++ b/l3trial/xfont/xfss.dtx
@@ -418,7 +418,7 @@
 \cs_generate_variant:Nn \prop_gpop:NnNF {cx}
 \cs_generate_variant:Nn \prop_gpop:NnN {cx}
 \cs_generate_variant:Nn \prop_get:NnNT {cx}
-\cs_generate_variant:Nn \str_fold_case:n { V }
+\cs_generate_variant:Nn \str_foldcase:n { V }
 %    \end{macrocode}
 %
 % \subsubsection{General}
@@ -839,7 +839,7 @@
   \clist_map_inline:nn {#1}
   {
     \tl_set:Nn \l_xfss_default_encoding_tl {##1}
-    \tl_set:Nx \l_fss_tmp_tl { \str_fold_case:n {##1} enc.def }
+    \tl_set:Nx \l_fss_tmp_tl { \str_foldcase:n {##1} enc.def }
     \file_if_exist:nTF { \l_fss_tmp_tl }
       { \exp_args:Nx \file_input:n  { \l_fss_tmp_tl } }
       { \msg_error:nnx {xfss} {encoding-file-missing} {\l_fss_tmp_tl} }
@@ -1262,7 +1262,7 @@
         \xfss_switch_catcodes:
         \tl_set:Nx \l_xfss_tmpa_tl {  \l_xfss_encoding_tl \l_xfss_family_tl .fd }
         \file_input:x
-          { \str_fold_case:V \l_xfss_tmpa_tl }
+          { \str_foldcase:V \l_xfss_tmpa_tl }
       }
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list