diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-07 01:22:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-07 01:22:49 +0000 |
commit | 3dd6d2ce5083791e0574668e2d2b76d32b248ed8 (patch) | |
tree | 3fc08ff582641658fd6da6925af1a255fb40645d /Master/texmf-dist/doc/generic/xstring/test_latex.tex | |
parent | be3631d25628ae81ce5039afc758db5ec49026ba (diff) |
xstring 1.4, and ignore its stale .tds.zip (4nov08)
git-svn-id: svn://tug.org/texlive/trunk@11208 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/xstring/test_latex.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/xstring/test_latex.tex | 411 |
1 files changed, 405 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/generic/xstring/test_latex.tex b/Master/texmf-dist/doc/generic/xstring/test_latex.tex index 72437521de2..cccddd2cb24 100644 --- a/Master/texmf-dist/doc/generic/xstring/test_latex.tex +++ b/Master/texmf-dist/doc/generic/xstring/test_latex.tex @@ -1,7 +1,8 @@ \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\usepackage[dvips,margin=1.5cm,noheadfoot]{geometry} +\usepackage{lmodern} +\usepackage[dvips,margin=1cm,noheadfoot]{geometry} \pagestyle{empty} \usepackage{xstring} @@ -12,22 +13,30 @@ \normalexpandarg \tokenize\cs@resultat{#1}% \fullexpandarg - \hbox to\linewidth{\hbox to0.7\linewidth{\hfil\tt#1}\quad\frontiere\cs@resultat\frontiere\hfil}\par} - + \leavevmode\hbox to0.7\linewidth{\hfil\tt#1}\quad\frontiere\cs@resultat\frontiere\hfil\par}% \makeatother -\newcommand\chapitre[2]{\medskip{\large\textbf{#1} \texttt{\textbackslash#2}}\smallskip} +\newcommand\chapitre[2]{\bigskip{\large\textbf{#1} \texttt{\textbackslash#2}}\smallskip} \def\delimiteur{|} \begin{document} \setlength{\parindent}{0pt} -\begin{center}\Large{Ceci est le fichier de test de xstring}.\end{center}\medskip +\begin{center}\Large{Ceci est le fichier de test de xstring}.\end{center} +\vspace{-1.8ex}\hrule\smallskip + +\hrule +\bigskip Toutes les situations ne sont pas envisagées, mais au moins un grand nombre ! Les macros sont examinées dans l'ordre logique du code. Lorsque le résultat contient des espaces ou peut conduire à des doutes, il sera entouré de ''\delimiteur``, étant entendu que ''\delimiteur\delimiteur`` est une chaîne vide.\bigskip +\hfill{\Large Le mode \tt\textbackslash fullexpandarg}\hfill{} + +\vspace{-1.5ex}\hspace{6cm}\hrulefill\hspace{6cm} + +\bigskip \chapitre{Le test}{IfSubStr} \exemple|\IfSubStr{abcdef}{cd}{vrai}{faux}| @@ -385,7 +394,6 @@ Lorsque le résultat contient des espaces ou peut conduire à des doutes, il ser \chapitre{La macro}{StrLen} - \exemple|\StrLen{abcdef}| \exemple|\StrLen{a b c}| \exemple|\StrLen{ a b c }| @@ -671,4 +679,395 @@ La tolérance stricte :\comparestrict\par \exemple|\StrCompare{eeee}{eee}[\aa]\aa| \exemple|\StrCompare{totutu}{tututu}[\aa]\aa| \exemple|\StrCompare{abcd}{abyz}[\aa]\aa| +\vspace{10ex} + +\hfill{\Large Le mode \tt\textbackslash noexpandarg}\hfill{} + +\vspace{-1.5ex}\hspace{6cm}\hrulefill\hspace{6cm} + +\bigskip +Dans toute la suite sauf si c'est précisé, la commande \verb|\noexpandarg| est activée.\bigskip +\makeatletter + +\long\def\@xs@afterreadverb#1{% + \tokenize\cs@resultat{#1}% + \leavevmode\hbox to0.7\linewidth{\hfil\tt#1}\quad\frontiere\cs@resultat\frontiere\hfil\par}% +\makeatother +\noexpandarg + +\bigskip +\chapitre{Le test}{IfSubStr} + +\exemple|\noexploregroups| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{2}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{34}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{{34}}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\b}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc5}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc{5}}{vrai}{faux}| +\exemple|\IfSubStr[1]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[2]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[3]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[4]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\exploregroups| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{2}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{34}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{{34}}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\b}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc5}{vrai}{faux}| +\exemple|\IfSubStr{1$2$\a{34}\bc5}{\bc{5}}{vrai}{faux}| +\exemple|\IfSubStr[1]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[2]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[3]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| +\exemple|\IfSubStr[4]{\a1{\a1{\a1}\a2}\a3}{\a}{vrai}{faux}| + +\chapitre{Le test}{IfBeginWith} + +Les tests doivent donner des résultats identiques ci-dessous puisque \verb|\IfBeginWith| est indifférent au mode d'exploration des groupes !\smallskip + +\exemple|\noexploregroups| +\exemple|\IfBeginWith{{\a}123\b456}{\a}{vrai}{faux}| +\exemple|\IfBeginWith{{\a}123\b456}{{\a}}{vrai}{faux}| +\exemple|\IfBeginWith{{\a1}\b\c\d}{\a}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{12}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{1}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{{1}2}{vrai}{faux}| +\exemple|\exploregroups| +\exemple|\IfBeginWith{{\a}123\b456}{\a}{vrai}{faux}| +\exemple|\IfBeginWith{{\a}123\b456}{{\a}}{vrai}{faux}| +\exemple|\IfBeginWith{{\a1}\b\c\d}{\a}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{12}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{1}{vrai}{faux}| +\exemple|\IfBeginWith{{1}23456}{{1}2}{vrai}{faux}| + +\chapitre{Le test}{IfEndWith} + +Les tests doivent donner des résultats identiques ci-dessous puisque \verb|\IfEndWith| est indifférent au mode d'exploration des groupes !\smallskip + +\exemple|\noexploregroups| +\exemple|\IfEndWith{\a1\b2{\c3}}{\c3}{vrai}{faux}| +\exemple|\IfEndWith{\a1\b2{\c3}}{{\c3}}{vrai}{faux}| +\exemple|\IfEndWith{\a1\b2{\c3}}{3}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{56}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{6}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{5{6}}{vrai}{faux}| +\exemple|\exploregroups| +\exemple|\IfEndWith{\a1\b2{\c3}}{\c3}{vrai}{faux}| +\exemple|\IfEndWith{\a1\b2{\c3}}{{\c3}}{vrai}{faux}| +\exemple|\IfEndWith{\a1\b2{\c3}}{3}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{56}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{6}{vrai}{faux}| +\exemple|\IfEndWith{12345{6}}{5{6}}{vrai}{faux}| + +\chapitre{Le test}{IfSubStrBefore} + +\exemple|\noexploregroups| +\exemple|\IfSubStrBefore[1,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[2,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[2,3]{\a1\a2\a3\b1\b2\b3}{\a}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[1,1]{\a1{\a2\a3\b1}\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[1,2]{\a1{\a2\a3\b1}\b2\b3}{3}{\b}{vrai}{faux}| +\exemple|\exploregroups| +\exemple|\IfSubStrBefore[1,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[2,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[2,3]{\a1\a2\a3\b1\b2\b3}{\a}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[1,1]{\a1{\a2\a3\b1}\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBefore[1,2]{\a1{\a2\a3\b1}\b2\b3}{3}{\b}{vrai}{faux}| + +\chapitre{Le test}{IfStrBehind} + +\exemple|\noexploregroups| +\exemple|\IfSubStrBehind[2,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBehind[3,1]{\a1\a2\a3\b1\b2\b3}{\a}{\b}{vrai}{faux}| +\exemple|\IfSubStrBehind[1,1]{\a1\a2\a3\b1\b2\b3}{\b}{3}{vrai}{faux}| +\exemple|\IfSubStrBehind[2,1]{\a1{\a2\a3\b1}\b2\b3}{\b}{3}{vrai}{faux}| +\exemple|\IfSubStrBehind[1,1]{\a1{\a2\a3\b1}\b2\b3}{3}{\b}{vrai}{faux}| +\exemple|\exploregroups| +\exemple|\IfSubStrBehind[2,1]{\a1\a2\a3\b1\b2\b3}{2}{\b}{vrai}{faux}| +\exemple|\IfSubStrBehind[3,1]{\a1\a2\a3\b1\b2\b3}{\a}{\b}{vrai}{faux}| +\exemple|\IfSubStrBehind[1,1]{\a1\a2\a3\b1\b2\b3}{\b}{3}{vrai}{faux}| +\exemple|\IfSubStrBehind[2,1]{\a1{\a2\a3\b1}\b2\b3}{\b}{3}{vrai}{faux}| +\exemple|\IfSubStrBehind[1,1]{\a1{\a2\a3\b1}\b2\b3}{3}{\b}{vrai}{faux}| + +\chapitre{Le test}{IfInteger} + +Dans les exemples ci-dessous, on examine la différence de comportement de la macro \verb|\IfInteger| selon les modes de développement des arguments.\smallskip + +\exemple|\def\nbA{-12}\def\nbB{498}| +\exemple|\def\nbAA{\nbA}\def\nbBB{\nbB}|\smallskip +\exemple|\fullexpandarg| +\exemple|\IfInteger{\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA5\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA6\nbB}{vrai}{faux}| +\exemple|\IfInteger{\nbAA7\nbBB}{vrai}{faux}|\smallskip +\exemple|\expandarg| +\exemple|\IfInteger{\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA5\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA6\nbB}{vrai}{faux}| +\exemple|\IfInteger{\nbAA7\nbBB}{vrai}{faux}|\smallskip +\exemple|\noexpandarg| +\exemple|\IfInteger{\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA5\nbA}{vrai}{faux}| +\exemple|\IfInteger{\nbA6\nbB}{vrai}{faux}| +\exemple|\IfInteger{\nbAA7\nbBB}{vrai}{faux}| + +\chapitre{Le test}{IfDecimal} + +Dans les exemples ci-dessous, on examine la différence de comportement de la macro \verb|\IfDecimal| selon les modes de développement des arguments.\smallskip + +\exemple|\def\nbA{-12}\def\nbB{498}| +\exemple|\def\nbAA{\nbA}\def\nbBB{\nbB}|\smallskip +\exemple|\fullexpandarg| +\exemple|\IfDecimal{\nbA,\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbAA.\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{3\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,\nbB}{vrai}{faux}|\smallskip +\exemple|\expandarg| +\exemple|\IfDecimal{\nbA,\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbAA.\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{3\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,\nbB}{vrai}{faux}|\smallskip +\exemple|\noexpandarg| +\exemple|\IfDecimal{\nbA,\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbAA.\nbB}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{3\nbB,777}{vrai}{faux}| +\exemple|\IfDecimal{\nbB,\nbB}{vrai}{faux}| + +\chapitre{La macro}{StrBefore} + +\exemple|\noexploregroups| +\exemple|\StrBefore[2]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[3]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[4]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[5]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[6]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrBefore[2]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[3]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[4]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[5]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBefore[6]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}| + +\chapitre{La macro}{StrBehind} + +\exemple|\noexploregroups| +\exemple|\StrBehind[2]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[3]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[4]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[5]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[6]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrBehind[2]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[3]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[4]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[5]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBehind[6]{1\a2\a3{4\a5{6\a7}8\a}9\a0}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}| + +\chapitre{La macro}{StrBetween} + +La commande \verb|\StrBetween| opère en mode \verb|\noexploregroups|, quelque soit le mode d'exploration en cours.\smallskip + +\exemple|\StrBetween[1,3]{\a1\a2{3\a4}5\a6{7\a8}9\a0}{2}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBetween[2,3]{\a1\a2{3\a4}5\a6{7\a8}9\a0}{\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBetween[1,3]{\a1\a2{3\a4}5\a6{7\a8}9\a0}{3}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrBetween[2,4]{\a1\a2{3\a4}5\a6{7\a8}9\a0}{\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{La macro}{StrSubstitute} + +\exemple|\noexploregroups| +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{\a}{\X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute[2]{\a1{2\a{3\a}4\a}\a5\a}{\a}{\X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{2}{X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{{3\a}}{XXX}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{3\a}{XXX}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{\a}{\X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute[2]{\a1{2\a{3\a}4\a}\a5\a}{\a}{\X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{2}{X}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{{3\a}}{XXX}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrSubstitute{\a1{2\a{3\a}4\a}\a5\a}{3\a}{XXX}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}| + +\chapitre{La macro}{StrDel} + +\exemple|\noexploregroups| +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel[2]{\a1{2\a{3\a}4\a}\a5\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{2}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{{3\a}}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{3\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel[2]{\a1{2\a{3\a}4\a}\a5\a}{\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{2}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{{3\a}}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrDel{\a1{2\a{3\a}4\a}\a5\a}{3\a}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{La macro}{StrLen} + +\exemple|\noexploregroups| +\exemple|\StrLen{a1{a2}{\a\b}{a3}a4}| +\exemple|\exploregroups| +\exemple|\StrLen{a1{a2}{\a\b}{a3}a4}| + +\chapitre{la macro}{StrSplit} + +\exemple|\noexploregroups| +\exemple|\StrSplit{\a{\b{\c\d}\e}\f\g}{2}\xx\yy| +\exemple|\#\detokenize\expandafter{\xx}\#\quad\#\detokenize\expandafter{\yy}\#| +\exemple|\StrSplit{\a{\b{\c\d}\e}\f\g}{3}\xx\yy| +\exemple|\#\detokenize\expandafter{\xx}\#\quad\#\detokenize\expandafter{\yy}\#| +\exemple|\exploregroups| +\exemple|\StrSplit{\a{\b{\c\d}\e}\f\g}{2}\xx\yy| +\exemple|\#\detokenize\expandafter{\xx}\#\quad\#\detokenize\expandafter{\yy}\#| +\exemple|\StrSplit{\a{\b{\c\d}\e}\f\g}{3}\xx\yy| +\exemple|\#\detokenize\expandafter{\xx}\#\quad\#\detokenize\expandafter{\yy}\#| + +\chapitre{la macro}{StrMid} + +La commande \verb|\StrMid| opère en mode \verb|\noexploregroups|, quelque soit le mode d'exploration en cours.\smallskip + +\exemple|\StrMid{\a\b{\c\d}\e\f\g\h}{2}{6}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\StrMid{\a\b{\c\d}\e\f\g\h}{3}{4}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{La macro}{StrGobbleLeft} + +\exemple|\noexploregroups| +\exemple|\StrGobbleLeft{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrGobbleLeft{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}| + +\chapitre{La macro}{StrGobbleRight} + +\exemple|\noexploregroups| +\exemple|\StrGobbleRight{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrGobbleRight{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{La macro}{StrLeft} + +\exemple|\noexploregroups| +\exemple|\StrLeft{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrLeft{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}| + +\chapitre{La macro}{StrRight} + +\exemple|\noexploregroups| +\exemple|\StrRight{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrRight{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{la macro}{StrChar} + +\exemple|\noexploregroups| +\exemple|\StrChar{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrChar{\a\b{\c\d\e}\f}{3}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip + +\chapitre{La macro}{StrCount} + +\exemple|\noexploregroups| +\exemple|\StrCount{\a1{\a2{\a3\a4}\a5}\a6\a7}{\a}| +\exemple|\StrCount{\a1{\a2{\a3\a4}\a5}\a6\a7}{2}| +\exemple|\exploregroups| +\exemple|\StrCount{\a1{\a2{\a3\a4}\a5}\a6\a7}{\a}| +\exemple|\StrCount{\a1{\a2{\a3\a4}\a5}\a6\a7}{2}| + +\chapitre{La macro}{StrPosition} + +\exemple|\noexploregroups| +\exemple|\StrPosition[3]{\a0\a1{\a{2\a3}4}\a5\a6}{\a}| +\exemple|\StrPosition[4]{\a0\a1{\a{3\a4}5}\a6\a7}{\a}| +\exemple|\StrPosition[1]{\a0\a1{\a{2\a3}4}\a5\a6}{2}| +\exemple|\exploregroups| +\exemple|\StrPosition[3]{\a0\a1{\a{2\a3}4}\a5\a6}{\a}| +\exemple|\StrPosition[4]{\a0\a1{\a{2\a3}4}\a5\a6}{\a}| +\exemple|\StrPosition[1]{\a0\a1{\a{2\a3}4}\a5\a6}{2}| + +\chapitre{La macro}{StrCompare} + +La commande \verb|\StrCompare| n'est pas affectée par le mode d'exploration.\smallskip + +\exemple|\comparenormal| +\exemple|\StrCompare{\a{\b1}\c2}{\a\b1\c2}| +\exemple|\StrCompare{{1\a2}3}{{1\a2}3}| +\exemple|\StrCompare{{1\a2}3}{1\a23}| +\exemple|\StrCompare{\a{\b\c}}{\a{\b\c}\d}| +\exemple|\StrCompare{{\a}\b}{\a\b}| +\exemple|\comparestrict| +\exemple|\StrCompare{\a{\b1}\c2}{\a\b1\c2}| +\exemple|\StrCompare{{1\a2}3}{{1\a2}3}| +\exemple|\StrCompare{{1\a2}3}{1\a23}| +\exemple|\StrCompare{\a{\b\c}}{\a{\b\c}\d}| +\exemple|\StrCompare{{\a}\b}{\a\b}| + +\chapitre{La macro}{StrRemoveBraces} + +\exemple|\noexploregroups| +\exemple|\StrRemoveBraces{\a1{\b2{\c3{\d4}}}\e5}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip +\exemple|\exploregroups| +\exemple|\StrRemoveBraces{\a1{\b2{\c3{\d4}}}\e5}[\cmd]| +\exemple|\detokenize\expandafter{\cmd}|\smallskip \end{document}
\ No newline at end of file |