aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/print-elided.hh
blob: 21bbf741cac14384159a6ad937827c1d8a76b1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
///@file

#include <ostream>


namespace nix {

/**
 * Print an `«... elided»` placeholder.
 *
 * Arguments are forwarded to `pluralize`.
 *
 * If `ansiColors` is set, the output will be wrapped in `ANSI_FAINT`.
 */
void printElided(
    std::ostream & output,
    unsigned int value,
    const std::string_view single,
    const std::string_view plural,
    bool ansiColors
);

}