mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Document "pad" function.
This commit is contained in:
20
man/remind.1
20
man/remind.1
@@ -3031,6 +3031,26 @@ Returns a string that is the ordinal number \fInum\fR. For example,
|
||||
.B ostype()
|
||||
Returns "UNIX". Remind used to run on OS/2 and MS-DOS, but does not
|
||||
any longer.
|
||||
.TP
|
||||
.B pad(x_arg, s_padstr, i_len [, i_right])
|
||||
Converts the first argument \fIarg\fR to a string if necessary, and
|
||||
then if it is shorter than \fIlen\fR characters, pads to to
|
||||
\fIlen\fR characters using as many copies (including partial copies)
|
||||
of \fIpadstr\fR as necessary. By default, the string is left-padded,
|
||||
but if \fIright\fR is supplied and non-zero, the string will
|
||||
be right-padded.
|
||||
.RS
|
||||
.PP
|
||||
Here are some examples:
|
||||
.nf
|
||||
pad(3, "0", 2) --> "03"
|
||||
pad(465, "0", 2) --> "465"
|
||||
pad("foo", " ", 5) --> " foo"
|
||||
pad("foo", " ", 5, 1) --> "foo "
|
||||
pad("foo", "bar", 11) --> "barbarbafoo"
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B plural(i_num [,s_str1 [,s_str2]])
|
||||
Can take from one to three arguments. If one argument is supplied, returns
|
||||
|
||||
Reference in New Issue
Block a user