
EN: rebol.com -
rebol.org -
rebol.net -
FR: Rebol Documentation Project -
forum RebelBB -
rebol-france.org -
forum codeur -
Convertit les espaces dans une chaîne en tabulations. (largeur de tabulation de 4)
entab string
string - La chaîne en argument. (type: any-string)
/size - Spécifie le nombre d’espaces par tabulation.
number - Le nombre d’espaces. (type: integer)
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 }
detab - Convertit les tabulations dans une chaîne en espaces (largeur de tabulation de 4).