diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3seq.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3seq.sty | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty index ab1ec03f467..0f3aee34e2c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3seq.dtx 2556 2011-08-12 14:00:43Z bruno $ +\GetIdInfo$Id: l3seq.dtx 2586 2011-08-15 03:59:12Z bruno $ {L3 Experimental sequences and stacks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -541,6 +541,38 @@ \prg_do_nothing: \exp_not:n { \seq_item:n {#1} } } +\cs_new_protected_nopar:Npn \seq_set_split:Nnn + { \seq_set_split_aux:NNnn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_split:Nnn + { \seq_set_split_aux:NNnn \tl_gset:Nx } +\cs_new_protected_nopar:Npn \seq_set_split_aux:NNnn #1 #2 #3 #4 + { + \tl_if_empty:nTF {#4} + { #1 #2 { } } + { + \tl_set:Nn \l_seq_tmpa_tl + { + \seq_set_split_aux_i:w \prg_do_nothing: + #4 + \seq_set_split_aux_end: + } + \tl_replace_all:Nnn \l_seq_tmpa_tl { #3 } + { + \seq_set_split_aux_end: + \seq_set_split_aux_i:w \prg_do_nothing: + } + \tl_set:Nx \l_seq_tmpa_tl { \l_seq_tmpa_tl } + #1 #2 { \l_seq_tmpa_tl } + } + } +\cs_new:Npn \seq_set_split_aux_i:w #1 \seq_set_split_aux_end: + { + \exp_not:N \seq_set_split_aux_ii:w + \exp_args:No \tl_trim_spaces:n {#1} + \exp_not:N \seq_set_split_aux_end: + } +\cs_new:Npn \seq_set_split_aux_ii:w #1 \seq_set_split_aux_end: + { \exp_not:n { \seq_item:n {#1} } } \cs_new_eq:NN \seq_top:NN \seq_get_left:NN \cs_new_eq:NN \seq_top:cN \seq_get_left:cN \cs_new_eq:NN \seq_display:N \seq_show:N |