-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I have been thinking how to organize package documentation. We basically have a few "groups" of functions that may make sense to be introduced together (at least in pkgdown):
Single-character functions
These are functions that return one character and do not require any "wrappers"
rx_alpha_num
rx_br
andrx_line_break
rx_digit
rx_something
rx_space
rx_tab
rx_whitespace
rx_word_char
andrx_word
(with defaultrep="some"
) argument.
Character "sets"
These function output ranges or "sets" of characters, wrapped into [
, for which we don't have a way to express them with single character. This is important when "nesting" them into supersets below, when "outer" set of [
need to be "peeled off". From the user stand point they may not be any different from Single-character functions
rx_alphanum
rx_alpha
rx_lower
andrx_upper
rx_punctuation
rx_range
"Appenders"
These functions take .data
argument and simply append something to it, thus modifying the behavior of previously appended function(s).
rx_capture_groups
rx_count
rx_end_of_line
andrx_start_of_line
rx_one_or_more
andrx_none_or_more
rx_with_any_case
"Expression-wrappers"
These functions allow user to specify the sequence of characters out of which all should be matched to the string.
rx_avoid
andrx_seek
rx_find
(andrx_literal
, which I now dropped)rx_maybe
(which isrx_find
withrep
argument set to "maybe")rx_or
(which might need a bit of extra work, see Syntax for rx_or() #16 and thus will be out of this category)
"Superset functions"
These functions specify a list of mutually exclusive symbols/expressions, only one of which should be matched to the string.
rx_one_of
rx_anything_but
andrx_something_but
(eventuallyrx_either_of
) will be moved here as well, if we decide to keep it.
I find this grouping helpful when reasoning about the functionality our package covers.
There are a few functions I dropped:
rx_any_of
(duplicate of rx_one_of
)
rx_digits
(too little advantage compared to rx_digit(rep=n)
rx_literal
(duplicate of rx_find
)
rx_not
(duplicate of rx_avoid_suffix
)
rx_new
has been moved to utils.R