R/RcppExports.R

Defines functions add_prefix add_pr

Documented in add_prefix

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Add a prefix to each word
#'
#' Add a custom prefix to each word of a a line to create different spaces.
#' Code in C++ (efficient).
#'
#' @param texts a [character] containing the original text
#' @param prefix unit [character] containing the prefix to add (length == 1) or [character] with same length than texts
#' @return [character] with prefixed words.
#' @examples
#' add_prefix(c("this is a test", "this is another    test"), "#")
#' @export
add_prefix <- function(texts, prefix) {
    .Call(`_fastrtext_add_prefix`, texts, prefix)
}

add_pr <- function(line, prefix) {
    .Call(`_fastrtext_add_pr`, line, prefix)
}

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
    .Call('_fastrtext_RcppExport_registerCCallable', PACKAGE = 'fastrtext')
})

Try the fastrtext package in your browser

Any scripts or data that you put into this service are public.

fastrtext documentation built on Oct. 30, 2019, 11:32 a.m.