Index of /ctan/macros/generic/xstring/

NameLast ModifiedSizeType
../ -  Directory
README2023-Aug-22 15:42:043.7Ktext/plain;charset=utf-8
test_etex.pdf2023-Aug-22 15:42:0497.4Kapplication/pdf
test_etex.tex2023-Aug-22 15:42:0436.9Kapplication/x-tex
test_latex.pdf2023-Aug-22 15:42:0448.7Kapplication/pdf
test_latex.tex2023-Aug-22 15:42:0440.4Kapplication/x-tex
xstring-en.pdf2023-Aug-22 15:42:04240.0Kapplication/pdf
xstring-en.tex2023-Aug-22 15:42:0461.8Kapplication/x-tex
xstring-fr.pdf2023-Aug-22 15:42:04232.9Kapplication/pdf
xstring-fr.tex2023-Aug-22 15:42:0469.4Kapplication/x-tex
xstring.sty2023-Aug-22 15:42:040.1Kapplication/octet-stream
xstring.tex2023-Aug-22 15:42:0448.2Kapplication/x-tex
                              _________________

                               xstring package
                                   v 1.86
                                 2023/08/22
                              _________________

This package provides macros manipulating strings for programming use.
A "string" is made of TeX code, i.e. chars (catcodes 10, 11 and 12), controls
sequences, groups between braces, tokens with other catcodes, excepted catcodes
6 and 14 (usually chars # and %).

Main features are:
  * tests:
     - does a string contains at least n times an another?
     - does a string starts (or ends) with another? etc.
     - is a string an integer? A decimal?
     - are 2 strings equal?
     - is a string equal to several cases?
  * extractions of substrings:
     - what is on the left (or the right) of the nth occurrence of a
       substring;
     - what is between the occurrences of 2 substrings;
     - substring between 2 positions;
     - split a string;
     - find a group with its identifier, etc.
  * substitution of all (or the n first) occurrences of a substring
    for an other substring;
  * n times expansion of the tokens of a string;
  * calculation of numbers:
     - length of a string;
     - position of the nth occurrence of a substring;
     - how many times a string contains a substring?
     - comparison of strings: position of the first difference;
     - identifier of the group in which a macro worked.

For advanced programming needs, other macros allow to use other special
characters forbiden in strings (#  %).

This bundle contains 7 files:
  * xstring.sty (the sty file for LaTeX)
  * xstring.tex (the package itself)
  * xstring_doc_en.tex and xstring_doc_en.pdf (manual in english)
  * xstring_doc_fr.tex and xstring_doc_fr.pdf (manual in french))
  * README (this file)

##############################################################################
##############################################################################

Cette extension regroupe un ensemble de macros manipulant des chaînes à des
fins de programmation.
Une "chaîne" est du code TeX, c'est-à-dire des caractères (catcodes 10, 11
et 12), des séquences de contrôle, des groupes entre accolades et des lexèmes
ayant d'autres catcodes excepté les catcodes 6 et 14 (habituellement les 
caractères # et %).

Les principales fonctionnalités sont :
  * des tests :
     - une chaîne en contient elle une autre au moins n fois ?
     - une chaîne commence t-elle ou finit-elle par une autre ? etc.
     - une chaîne est-elle un entier relatif ? Un décimal ?
     - deux chaînes sont-elles égales ?
     - une chaîne est elle égale à plusieurs cas ?
  * des extractions de chaines :
     - renvoi de ce qui se trouve avant (ou après) la nieme occurrence
       d'une sous-chaîne;
     - renvoi de ce qui se trouve entre les occurrences de 2 sous-chaînes;
     - sous-chaîne comprise entre 2 positions;
     - coupure d'une chaîne;
     - recherche d'un groupe avec son identifiant.
  * le remplacement de toutes ou des n premières occurrences d'une
    sous-chaîne par une autre sous-chaîne;
  * n-développement des tokens d'une chaîne;
  * des calculs de nombres :
     - longueur d'une chaîne;
     - position de la la nieme occurrence d'une sous-chaîne;
     - comptage du nombre d'occurrences d'une sous-chaîne dans une autre;
     - comparaison de 2 chaînes : position de la 1ere différence;
     - identifiant du groupe dans lequel les macros ont opéré.

Pour des méthodes de programmation avancées, d'autres commandes permettent
d'utiliser les caractères spéciaux interdits dans les chaines (# %).

                                                      Christian Tellechea
                                                     <[email protected]>
panini/0.0.8 us-west-1 b156048a-bcf3-4b4f-96ed-31e873bb3711