fastrtext (version 0.3.3)

add_prefix: Add a prefix to each word

Description

Add a custom prefix to each word of a a line to create different spaces. Code in C++ (efficient).

Usage

add_prefix(texts, prefix)

Arguments

texts

a character containing the original text

prefix

unit character containing the prefix to add (length == 1) or character with same length than texts

Value

character with prefixed words.

Examples

Run this code
# NOT RUN {
add_prefix(c("this is a test", "this is another    test"), "#")
# }

Run the code above in your browser using DataLab