mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd: Add convenience to test if line has a param number.
This commit is contained in:
parent
9d558e5eb4
commit
eb1d8fd8e6
1 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,14 @@ inline auto &command(line &line) { return line.cmd;
|
|||
inline auto &parv(const line &line) { return line.parv; }
|
||||
inline auto &parv(line &line) { return line.parv; }
|
||||
inline auto parc(const line &line) { return parv(line).size(); }
|
||||
bool has(const line &line, const uint &argp);
|
||||
|
||||
inline bool
|
||||
has(const line &line,
|
||||
const uint &argp)
|
||||
{
|
||||
return parc(line) > argp;
|
||||
}
|
||||
|
||||
inline auto &
|
||||
line::operator[](const size_t &pos)
|
||||
|
|
Loading…
Reference in a new issue