summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-18 23:12:56 +0000
committerKarl Berry <karl@freefriends.org>2011-08-18 23:12:56 +0000
commiteae5d19d439ded67f5535d315a8983939733b548 (patch)
tree4a9013282bd26875540c662fbde8bd49b28b6f51 /Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
parent9e6c3db576f3908b80eb70d378aca43a22c043b1 (diff)
l3kernel 2607 (17aug11)
git-svn-id: svn://tug.org/texlive/trunk@23596 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3seq.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3seq.sty34
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