identify_separator: Identify source string separator.

Description Usage Arguments Details Value

Description

Attempts to identify the separator used in a source character string.

Usage

1
identify_separator(source_str, ignore = NULL)

Arguments

source_str

A character string to evaluate for separator candidates.

ignore

A vector of strings describing symbols to exclude as candidates.

Details

This function defines and implements the logic used to auto-identify a separator in a source string when a person declines to manually specify the source string separator. It is a core helper function for convert_string. It is not vectorized and is not intended for external use.

By default the function captures any non-character, non-numeric symbol as a candidate separator. Users can specify specific symbols to ignore, but if a character/numeric symbol or symbols are the separtor the user will need to manually specify the separator at the level of convert_string.

Value

If the input is a character string - evaluated/forced by convert_string - the output will be a list including a detected separator style and separator(s). If multiple separator candidates are detected and the candidates to ignore have not been specified, a warning will be returned as well.


bwaismeyer/caser documentation built on May 13, 2019, 9:05 a.m.