Re: [PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-23 Thread Rasmus Villemoes
On 23/10/2019 15.13, Jani Nikula wrote: > The kernel has plenty of ternary operators to choose between constant > strings, such as condition ? "yes" : "no", as well as value == 1 ? "" : > "s": > > > v4: Massaged commit message about space savings to make it less fluffy > based on Rasmus'

[PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-23 Thread Jani Nikula
The kernel has plenty of ternary operators to choose between constant strings, such as condition ? "yes" : "no", as well as value == 1 ? "" : "s": $ git grep '? "yes" : "no"' | wc -l 258 $ git grep '? "on" : "off"' | wc -l 204 $ git grep '? "enabled" : "disabled"' | wc -l 196 $ git grep '? "" :