grapes-fmt-grapes: Format a string

Description Usage Arguments Examples

Description

A string with marks in the form of "" is formated at these points with the values passed on the right side. On the right side is to be passed a vector with the same amount of substituents as the string has "" marks.

Usage

1
input_str %fmt% sub_vec

Arguments

input_str

a character string with some placeholders of the form "" or "index"

sub_vec

a character string vector of the strings to fill the placeholders

Examples

1
2
3
"Hello {}. This is supposed to be a {}!" %fmt% c("World", "Test")

"This is supposed to be a {2}. Hello {1}." %fmt% c("World", "Test")

LazerLambda/RolliNLP documentation built on Oct. 17, 2020, 8:54 p.m.