summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty46
1 files changed, 27 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
index 00dc8f8d251..ecfb1d2f4e1 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}
-[2013/04/24 v1.22
+[2015/02/02 v1.23
Extensive array of string manipulation routines for
cosmetic and programming application]
\NeedsTeXFormat{LaTeX2e}
@@ -925,6 +925,7 @@
\newif\ifmatchingchar
\newcommand\testmatchingchar[3]{%
+ \setbox0=\hbox{%
\substring[e]{#1}{#2}{#2}\+%
\isnextbyte[q]{\EscapeChar}{#3}%
\if T\theresult%
@@ -934,15 +935,16 @@
\edef\@teststring{\@DiscardNextChar{\thestring}}%
\if \@teststring\@testcode\matchingchartrue\else\matchingcharfalse\fi
\else
- \matchingcharfalse%
+ \global\matchingcharfalse%
\fi
\else
- \if \thestring#3\matchingchartrue\else\matchingcharfalse\fi
- \fi
+ \if \thestring#3\global\matchingchartrue\else\global\matchingcharfalse\fi
+ \fi}
\?}
\newif\ifcapitalized
\newcommand\testcapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -960,12 +962,13 @@
\edef\@stringB{\@rotate{#1}}%
\fi
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\capitalizedfalse}{\capitalizedtrue}\?%
+ {\global\capitalizedfalse}{\global\capitalizedtrue}}\?%
\defaultTreatments%
}
\newif\ifuncapitalized
\newcommand\testuncapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -983,7 +986,7 @@
\edef\@stringB{\@rotate{#1}}%
\fi
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\uncapitalizedfalse}{\uncapitalizedtrue}\?%
+ {\global\uncapitalizedfalse}{\global\uncapitalizedtrue}}\?%
\defaultTreatments%
}
@@ -1004,6 +1007,7 @@
\newif\ifuppercase
\newcommand\testuppercase[1]{%
+ \setbox0=\hbox{%
\Treatments{1}{1}{0}{0}{0}{0}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringA{\thestring}%
@@ -1014,14 +1018,15 @@
{%
\@getstringlength{\@stringA}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\uppercasefalse}{\uppercasetrue}%
+ {\global\uppercasefalse}{\global\uppercasetrue}%
}%
- {\uppercasefalse}%
+ {\global\uppercasefalse}}%
\defaultTreatments%
}
\newif\ifsolelyuppercase
\newcommand\testsolelyuppercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelyuppercase[e]{#1}%
@@ -1031,32 +1036,34 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelyuppercasefalse}{\solelyuppercasetrue}%
+ {\global\solelyuppercasefalse}{\global\solelyuppercasetrue}%
}%
- {\solelyuppercasefalse}%
+ {\global\solelyuppercasefalse}}%
\defaultTreatments%
}
\newif\iflowercase
\newcommand\testlowercase[1]{%
+ \setbox0=\hbox{%
\Treatments{1}{1}{0}{0}{0}{0}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringA{\thestring}%
\def\AlphaCapsTreatment{2}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringB{\thestring}%
- \ifthenelse{\equal{\@stringA}{\@stringB}}%
+ \ifthenelse{\equal{\@stringA}{\@stringB}}%
{%
\@getstringlength{\@stringA}{@stringsize}%
- \ifthenelse{\value{@stringsize} = 0}%
- {\lowercasefalse}{\lowercasetrue}%
+ \ifnum\value{@stringsize}= 0\relax%
+ \global\lowercasefalse\else\global\lowercasetrue\fi%
}%
- {\lowercasefalse}%
+ {\global\lowercasefalse}}%
\defaultTreatments%
}
\newif\ifsolelylowercase
\newcommand\testsolelylowercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelylowercase[e]{#1}%
@@ -1066,14 +1073,15 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelylowercasefalse}{\solelylowercasetrue}%
+ {\global\solelylowercasefalse}{\global\solelylowercasetrue}%
}%
- {\solelylowercasefalse}%
+ {\global\solelylowercasefalse}}%
\defaultTreatments%
}
\newif\ifalphabetic
\newcommand\testalphabetic[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\alphabetic[e]{#1}%
@@ -1083,9 +1091,9 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\alphabeticfalse}{\alphabetictrue}%
+ {\global\alphabeticfalse}{\global\alphabetictrue}%
}%
- {\alphabeticfalse}%
+ {\global\alphabeticfalse}}%
\defaultTreatments%
}
@@ -1306,7 +1314,7 @@
\expandafter\def\csname#2\endcsname{\%}\else
\expandafter\ifx\expandafter\##1%
\expandafter\def\csname#2\endcsname{\#}\else
- \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{~}\else
+ \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{\ }\else
\expandafter\edef\csname#2\endcsname{#1}%
\fi
\fi