mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
19 lines
332 B
C++
19 lines
332 B
C++
|
#pragma once
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
namespace nix {
|
||
|
|
||
|
/**
|
||
|
* Pluralize a given value.
|
||
|
*
|
||
|
* If `count == 1`, prints `1 {single}` to `output`, otherwise prints `{count} {plural}`.
|
||
|
*/
|
||
|
std::ostream & pluralize(
|
||
|
std::ostream & output,
|
||
|
unsigned int count,
|
||
|
const std::string_view single,
|
||
|
const std::string_view plural);
|
||
|
|
||
|
}
|