form3justifie: formats a character string

Description Usage Arguments Value Examples

View source: R/f0.rbsb1.code.r

Description

Formats character string(s). The main use of this function is to produce aligned columns lists while printing the rows not at the same time.

Usage

1
form3justifie(chaine, nbc=8, format=3, tronc=TRUE, carac="")

Arguments

chaine

the character string to be printed, can be a vector.

nbc

Desired number of characters for the result; when chain is a vector can be a vector of the same length

format

Indicates the type of alignment:
0 no aligment (no supplementary character added to reach nbc)
1 to the left side
2 centered
3 to the right side

tronc

If true, no more than nbc characters are returned and possibly the string is truncated. In that case, $ is added for indicating the fact.

carac

Character to use for enlarging the string

Value

a character string

Examples

1
2
3
4
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 form3justifie("vers")
 form3justifie("versification", 5)
 form3justifie(letters[1:5], format=2, carac="+");

rbsb documentation built on May 2, 2019, 4:41 p.m.

Related to form3justifie in rbsb...