icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Rename icu_pattern types to indicate that they can hold multiple numbers of placeholders

Open sffc opened this issue 1 year ago • 2 comments

@younies had assumed that SinglePlaceholderPattern required exactly one placeholder in the pattern, when in fact it supports zero or one. Given that this is primarily an internal-facing type and that this naming is likely to cause additional confusion in the future, we should probably change the names as follows:

  • SinglePlaceholderPattern --> OneOrZeroPlaceholderPattern
  • DoublePlaceholderPattern --> TwoOneOrZeroPlaceholderPattern

The third type, MultiNamedPlaceholderPattern, can probably stay as-is.

sffc avatar Jun 10 '24 20:06 sffc