mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd: Rename tokens_count() to token_count().
This commit is contained in:
parent
d3f6ed0320
commit
4f0de4915d
3 changed files with 9 additions and 9 deletions
|
@ -67,7 +67,7 @@ ircd::util::params::at(const size_t &i,
|
|||
const T &def)
|
||||
const try
|
||||
{
|
||||
return tokens_count(in, sep) > i? at<T>(i) : def;
|
||||
return token_count(in, sep) > i? at<T>(i) : def;
|
||||
}
|
||||
catch(const bad_lex_cast &e)
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ inline ircd::string_view
|
|||
ircd::util::params::operator[](const size_t &i)
|
||||
const
|
||||
{
|
||||
return tokens_count(in, sep) > i? token(in, sep, i) : string_view{};
|
||||
return token_count(in, sep) > i? token(in, sep, i) : string_view{};
|
||||
}
|
||||
|
||||
inline const char *
|
||||
|
|
|
@ -83,8 +83,8 @@ namespace ircd
|
|||
C<T, Comp, A> tokens(const string_view &str, const sep &);
|
||||
|
||||
// Convenience to get individual tokens
|
||||
size_t tokens_count(const string_view &str, const char &sep);
|
||||
size_t tokens_count(const string_view &str, const char *const &sep);
|
||||
size_t token_count(const string_view &str, const char &sep);
|
||||
size_t token_count(const string_view &str, const char *const &sep);
|
||||
string_view token(const string_view &str, const char &sep, const size_t &at);
|
||||
string_view token(const string_view &str, const char *const &sep, const size_t &at);
|
||||
string_view token_last(const string_view &str, const char &sep);
|
||||
|
|
|
@ -138,16 +138,16 @@ ircd::token(const string_view &str,
|
|||
}
|
||||
|
||||
size_t
|
||||
ircd::tokens_count(const string_view &str,
|
||||
const char &sep)
|
||||
ircd::token_count(const string_view &str,
|
||||
const char &sep)
|
||||
{
|
||||
const char ssep[2] { sep, '\0' };
|
||||
return tokens_count(str, ssep);
|
||||
return token_count(str, ssep);
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::tokens_count(const string_view &str,
|
||||
const char *const &sep)
|
||||
ircd::token_count(const string_view &str,
|
||||
const char *const &sep)
|
||||
{
|
||||
using type = string_view;
|
||||
using iter = typename type::const_iterator;
|
||||
|
|
Loading…
Reference in a new issue