This function should only ever see a single label (x
)
and a single notation
.
strip_label_part(x, notation, part, pattern_pref = "", pattern_suff = "")
A label shorn of the part to be stripped.
The label(s) to be split.
The notations to be used for each x
.
The part of the label to work on, such as "pref_start", "pref_end", "suff_start", or "suff_end".
The prefix to a regex pattern to be used in gsub()
.
The suffix to a regex pattern to be used in gsub()
.
If notation
is NULL
, x
is returned, unmodified.