processString {RapidFuzz}R Documentation

Process a String

Description

Processes a given input string by applying optional trimming, case conversion, and ASCII transliteration.

Usage

processString(input, processor = TRUE, asciify = FALSE)

Arguments

input

A std::string representing the input string to be processed.

processor

A bool indicating whether to trim whitespace and convert the string to lowercase. Default is true.

asciify

A bool indicating whether to transliterate non-ASCII characters to their closest ASCII equivalents. Default is false.

Details

The function applies the following transformations to the input string, in this order:

Value

A std::string representing the processed string.

Examples

# Example usage
processString("  Éxâmple!  ", processor = TRUE, asciify = TRUE)
# Returns: "example!"

processString("  Éxâmple!  ", processor = TRUE, asciify = FALSE)
# Returns: "éxâmple!"

processString("  Éxâmple!  ", processor = FALSE, asciify = TRUE)
# Returns: "Éxâmple!"

processString("  Éxâmple!  ", processor = FALSE, asciify = FALSE)
# Returns: "  Éxâmple!  "

[Package RapidFuzz version 1.0 Index]