summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3str.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx18
1 files changed, 15 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index 437ca6caa05..32dd203cfc4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-08-14}
+% \date{Released 2019-08-25}
%
% \maketitle
%
@@ -401,6 +401,10 @@
%
% \section{Mapping to strings}
%
+% All mappings are done at the current group level, \emph{i.e.}~any
+% local assignments made by the \meta{function} or \meta{code} discussed
+% below remain in effect after the loop.
+%
% \begin{function}[added = 2017-11-14, rEXP]
% {\str_map_function:NN, \str_map_function:cN}
% \begin{syntax}
@@ -454,7 +458,9 @@
% in turn in the (string or token list) \meta{variable} and applies
% the \meta{code}. The \meta{code} will usually make use of the
% \meta{variable}, but this is not enforced. The assignments to the
-% \meta{variable} are local. See also \cs{str_map_inline:Nn}.
+% \meta{variable} are local. Its value after the loop is the last
+% \meta{character} in the \meta{string}, or its original value if the
+% \meta{string} is empty. See also \cs{str_map_inline:Nn}.
% \end{function}
%
% \begin{function}[added = 2017-11-14]
@@ -467,7 +473,9 @@
% the (string or token list) \meta{variable} and applies the
% \meta{code}. The \meta{code} will usually make use of the
% \meta{variable}, but this is not enforced. The assignments to the
-% \meta{variable} are local. See also \cs{str_map_inline:Nn}.
+% \meta{variable} are local. Its value after the loop is the last
+% \meta{character} in the \meta{string}, or its original value if the
+% \meta{string} is empty. See also \cs{str_map_inline:Nn}.
% \end{function}
%
% \begin{function}[added = 2017-10-08, rEXP]{\str_map_break:}
@@ -1275,6 +1283,10 @@
% times speed up by testing only every $9$-th character for whether it
% is \cs{q_recursion_tail} (also by converting $9$ spaces at a time in
% the \cs{str_map_function:nN} case).
+%
+% For the \texttt{map_variable} functions we use a string assignment
+% to store each character because spaces are made catcode~$12$ before
+% the loop.
% \begin{macrocode}
\cs_new:Npn \str_map_function:nN #1#2
{