Skip to content

Commit

Permalink
Clarify the use of the %s marker in a config setting's description
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnovak committed Jun 12, 2024
1 parent 236897a commit 09f1d3a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ class Property {
void SetDeprecatedWithAlternateValue(const char* deprecated_value,
const char* alternate_value);

// The string may contain a single '%s' marker. If present, it will be
// substitued with the settings's default value (see `GetHelp()` and
// `GetHelpUtf8()`).
void Set_help(const std::string& str);

void SetOptionHelp(const std::string& option, const std::string& in);
void SetOptionHelp(const std::string& in);

// If the setting's help text contains a '%s' marker, the `GetHelp`
// functions will substitute it with the setting's default value.
std::string GetHelp() const;
std::string GetHelpUtf8() const;

Expand Down

0 comments on commit 09f1d3a

Please sign in to comment.