7. String Services
******************

The modules described in this chapter provide a wide range of string
manipulation operations.

In addition, Python’s built-in string classes support the sequence
type methods described in the Sequence Types — str, unicode, list,
tuple, bytearray, buffer, xrange section, and also the string-specific
methods described in the Méthodes de chaînes de caractères section. To
output formatted strings use template strings or the "%" operator
described in the String Formatting Operations section. Also, see the
"re" module for string functions based on regular expressions.

* 7.1. "string" — Opérations usuelles sur des chaînes

  * 7.1.1. Chaînes constantes

  * 7.1.2. Formatage personnalisé de chaîne

  * 7.1.3. Syntaxe de formatage de chaîne

    * 7.1.3.1. Mini-langage de spécification de format

    * 7.1.3.2. Exemples de formats

  * 7.1.4. Chaînes modèles

  * 7.1.5. String functions

  * 7.1.6. Deprecated string functions

* 7.2. "re" — Opérations à base d’expressions rationnelles

  * 7.2.1. Syntaxe des expressions rationnelles

  * 7.2.2. Contenu du module

  * 7.2.3. Objets d’expressions rationnelles

  * 7.2.4. Objets de correspondance

  * 7.2.5. Exemples

    * 7.2.5.1. Checking For a Pair

    * 7.2.5.2. Simuler *scanf()*

    * 7.2.5.3. search() vs. match()

    * 7.2.5.4. Construire un répertoire téléphonique

    * 7.2.5.5. Mélanger les lettres des mots

    * 7.2.5.6. Trouver tous les adverbes

    * 7.2.5.7. Trouver tous les adverbes et leurs positions

    * 7.2.5.8. Notation brutes de chaînes

* 7.3. "struct" — Interpret strings as packed binary data

  * 7.3.1. Functions and Exceptions

  * 7.3.2. Format Strings

    * 7.3.2.1. Byte Order, Size, and Alignment

    * 7.3.2.2. Format Characters

    * 7.3.2.3. Exemples

  * 7.3.3. Classes

* 7.4. "difflib" — Helpers for computing deltas

  * 7.4.1. SequenceMatcher Objects

  * 7.4.2. SequenceMatcher Examples

  * 7.4.3. Differ Objects

  * 7.4.4. Differ Example

  * 7.4.5. A command-line interface to difflib

* 7.5. "StringIO" — Read and write strings as files

* 7.6. "cStringIO" — Faster version of "StringIO"

* 7.7. "textwrap" — Text wrapping and filling

* 7.8. "codecs" — Codec registry and base classes

  * 7.8.1. Codec Base Classes

    * 7.8.1.1. Codec Objects

    * 7.8.1.2. IncrementalEncoder Objects

    * 7.8.1.3. IncrementalDecoder Objects

    * 7.8.1.4. StreamWriter Objects

    * 7.8.1.5. StreamReader Objects

    * 7.8.1.6. StreamReaderWriter Objects

    * 7.8.1.7. StreamRecoder Objects

  * 7.8.2. Encodings and Unicode

  * 7.8.3. Standard Encodings

  * 7.8.4. Python Specific Encodings

  * 7.8.5. "encodings.idna" — Internationalized Domain Names in
    Applications

  * 7.8.6. "encodings.utf_8_sig" — UTF-8 codec with BOM signature

* 7.9. "unicodedata" — Base de données Unicode

* 7.10. "stringprep" — Internet String Preparation

* 7.11. "fpformat" — Floating point conversions
