-
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_numrx_brandrx_line_breakrx_digitrx_somethingrx_spacerx_tabrx_whitespacerx_word_charandrx_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_alphanumrx_alpharx_lowerandrx_upperrx_punctuationrx_range
"Appenders"
These functions take .data argument and simply append something to it, thus modifying the behavior of previously appended function(s).
rx_capture_groupsrx_countrx_end_of_lineandrx_start_of_linerx_one_or_moreandrx_none_or_morerx_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_avoidandrx_seekrx_find(andrx_literal, which I now dropped)rx_maybe(which isrx_findwithrepargument 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_ofrx_anything_butandrx_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