summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty')
-rw-r--r--Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty68
1 files changed, 67 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
index e41ca502baf..5e40274e207 100644
--- a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
+++ b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesPackage{stringstrings}
-[2009/11/02 v1.10
+[2010/02/23 v1.20
Extensive array of string manipulation routines for
cosmetic and programming application]
\NeedsTeXFormat{LaTeX2e}
@@ -105,6 +105,21 @@
\def\EncodedDollar{\EscapeChar\DollarCode}
\def\Dollar{\symbol{36}}
+\def\UvariCode{W}
+\def\EncodedUvari{\EscapeChar\UvariCode}
+\def\Uvari{Uvari}
+\let\uvari\EncodedUvari
+
+\def\UvariiCode{X}
+\def\EncodedUvarii{\EscapeChar\UvariiCode}
+\def\Uvarii{Uvarii}
+\let\uvarii\EncodedUvarii
+
+\def\UvariiiCode{Y}
+\def\EncodedUvariii{\EscapeChar\UvariiiCode}
+\def\Uvariii{Uvariii}
+\let\uvariii\EncodedUvariii
+
\def\CaratCode{2}
\def\EncodedCarat{\EscapeChar\CaratCode}
\def\Carat{\symbol{94}}
@@ -384,6 +399,36 @@
\let\ss\SaveEszett%
}
+\newcommand\encodetoken[2][1]{%
+ \if 1#1%
+ \let\Uvari#2%
+ \let#2\uvari\else
+ \if 2#1%
+ \let\Uvarii#2%
+ \let#2\uvarii\else
+ \if 3#1%
+ \let\Uvariii#2%
+ \let#2\uvariii%
+ \fi
+ \fi
+ \fi
+}
+
+\newcommand\decodetoken[2][1]{%
+ \if 1#1%
+ \let#2\Uvari%
+ \def\Uvari{Uvari}\else
+ \if 2#1%
+ \let#2\Uvarii%
+ \def\Uvarii{Uvarii}\else
+ \if 3#1%
+ \let#2\Uvariii%
+ \def\Uvariii{Uvariii}%
+ \fi
+ \fi
+ \fi
+}
+
%%%%% COMMANDS TO MANIPULATE STRINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\substring[4][v]{\+%
@@ -1047,6 +1092,9 @@
%%%%% SUPPORT ROUTINES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\ESCrotate[1]{%
+ \if\UvariCode#1\@uvariaction\else
+ \if\UvariiCode#1\@uvariiaction\else
+ \if\UvariiiCode#1\@uvariiiaction\else
\if\@fromcode#1\@tostring\else
\if\PipeCode#1\@pipeaction\else
\if\DollarCode#1\@dollaraction\else
@@ -1128,6 +1176,9 @@
\fi
\fi
\fi
+ \fi
+ \fi
+ \fi
}
\newcommand\@getnextword[2][v]{%
@@ -1141,6 +1192,12 @@
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\edef\@ESCcode{\expandafter\@gobble#1}%
+ \if\UvariCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvari}\else
+ \if\UvariiCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvarii}\else
+ \if\UvariiiCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvariii}\else
\if\PipeCode\@ESCcode%
\expandafter\def\csname#2\endcsname{\Pipe}\else
\if\DollarCode\@ESCcode%
@@ -1239,6 +1296,9 @@
\fi
\fi
\fi
+ \fi
+ \fi
+ \fi
\else
\expandafter\ifx\expandafter\&#1%
\expandafter\def\csname#2\endcsname{\&}\else
@@ -1260,6 +1320,9 @@
\edef\@blankaction{\EncodedBlankSpace}%
\def\@dollaraction{\EncodedDollar}%
\def\@pipeaction{\EncodedPipe}%
+ \def\@uvariaction{\EncodedUvari}%
+ \def\@uvariiaction{\EncodedUvarii}%
+ \def\@uvariiiaction{\EncodedUvariii}%
\def\@carataction{\EncodedCarat}%
\def\@circumflexaction{\EncodedCircumflex}%
\def\@tildeaction{\EncodedTilde}%
@@ -1317,6 +1380,9 @@
\def\@blankaction{\BlankSpace}%
\def\@dollaraction{\Dollar}%
\def\@pipeaction{\Pipe}%
+ \def\@uvariaction{\Uvari}%
+ \def\@uvariiaction{\Uvarii}%
+ \def\@uvariiiaction{\Uvariii}%
\def\@carataction{\Carat}%
\def\@circumflexaction{\Circumflex}%
\def\@tildeaction{\Tilde}%