articles/dicorebol-fr/entab.txt · Dernière modification: 07/05/2005 00:20

EN: rebol.com - rebol.org - rebol.net -
FR: Rebol Documentation Project - forum RebelBB - rebol-france.org - forum codeur -

 

Entab - Détail de la fonction

En résumé :

Convertit les espaces dans une chaîne en tabulations. (largeur de tabulation de 4)

Utilisation :

entab string

Arguments :

string - La chaîne en argument. (type: any-string)

Raffinement :

/size - Spécifie le nombre d’espaces par tabulation.

number - Le nombre d’espaces. (type: integer)

Description :

Dans le langage REBOL, la largeur de tabulation par défaut est de quatre espaces. Utilisez le raffinement /SIZE (taille) pour les autres largeurs telles que huit. ENTAB placera seulement des tabulations au début de la ligne (avant le premier caractère différent d’un espace.)

La série transmise à cette fonction est retournée modifiée.

    text: {
        no
        tabs
        in
        this
        sentence
    } 
    remove head remove back tail text
    probe text
    {        no
            tabs
            in
            this
            sentence
       }
    probe entab copy text
    {^-^-no
    ^-^-tabs
    ^-^-in
    ^-^-this
    ^-^-sentence
    }
    print entab copy text
    		no
    		tabs
    		in
    		this
    		sentence
    probe entab/size copy text 2
    {^-^-^-^-no
    ^-^-^-^-tabs
    ^-^-^-^-in
    ^-^-^-^-this
    ^-^-^-^-sentence
    ^-}
    print entab/size copy text 2
    				no
    				tabs
    				in
    				this
    				sentence

La fonction opposée est DETAB qui reconvertit les tabulations en espaces:

    probe entab text
    {^-^-no
    ^-^-tabs
 
    ^-^-in
    ^-^-this
    ^-^-sentence
    }
    probe detab text
    {        no
            tabs
            in
            this
            sentence
    }

Fonction en relation :

detab - Convertit les tabulations dans une chaîne en espaces (largeur de tabulation de 4).

Version anglaise officielle :

 
  articles/dicorebol-fr/entab.txt · Dernière modification: 07/05/2005 00:20
 
Fil RSS: Recent changes RSS feed
Valid XHTML 1.0 Valid CSS Powered by PHP Driven by DokuWiki
Hébergement par Spinodo