str_pad2: Pad a string.

str_pad2R Documentation

Pad a string.

Description

Forked from sen2r::str_pad2(). Vectorised over string, width and pad. This is an internal function doing the same thing of stringr::str_pad (except for parameters 'width' and 'length' which must be of length 1), but without depending on package stringi.

Usage

str_pad2(string, width, side = c("left", "right", "both"), pad = " ")

Arguments

string

A character vector.

width

Minimum width of padded strings.

side

Side on which padding character is added (left, right or both).

pad

Single padding character (default is a space).

Value

A character vector.

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2019) luigi@ranghetti.info

References

L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). "sen2r": An R toolbox for automatically downloading and preprocessing Sentinel-2 satellite data. Computers & Geosciences, 139, 104473. DOI: https://doi.org/10.1016/j.cageo.2020.104473, URL: http://sen2r.ranghetti.info/.


ranghetti/guinterp documentation built on March 30, 2024, 3:42 a.m.