Lines Matching defs:std

109 std::string percent_encode(const unsigned char *target, size_t len);
111 std::string percent_encode(const std::string &target);
114 std::string percent_decode(InputIt first, InputIt last) {
115 std::string result;
117 auto p = std::begin(result);
133 result.resize(p - std::begin(result));
144 for (auto first = std::begin(target); first != std::end(target); ++first) {
188 std::string format_hex(const unsigned char *s, size_t len);
190 template <size_t N> std::string format_hex(const unsigned char (&s)[N]) {
194 template <size_t N> std::string format_hex(const std::array<uint8_t, N> &s) {
220 for (auto it = std::begin(s); it != std::end(s); it += 2) {
229 std::string http_date(time_t t);
237 std::string common_log_date(time_t t);
245 std::string iso8601_date(int64_t ms);
295 return std::equal(first2, last2, first1);
314 return std::equal(first2, last2, first1, CaseCmp());
332 return std::equal(first2, last2, last1 - (last2 - first2));
350 return std::equal(first2, last2, last1 - (last2 - first2), CaseCmp());
364 if (std::distance(first1, last1) != std::distance(first2, last2)) {
368 return std::equal(first1, last1, first2, CaseCmp());
387 if (std::distance(first1, last1) != std::distance(first2, last2)) {
390 return std::equal(first1, last1, first2);
410 return std::search(a.begin(), a.end(), b.begin(), b.end(), CaseCmp()) !=
415 std::transform(first, last, first, lowcase);
419 inline void inp_strlower(std::string &s) {
420 inp_strlower(std::begin(s), std::end(s));
424 std::string dtos(double n);
426 template <typename T> std::string utos(T n) {
427 std::string res;
467 template <typename T> std::string utos_unit(T n) {
486 template <typename T> std::string utos_funit(T n) {
505 template <typename T> std::string utox(T n) {
506 std::string res;
523 void to_token68(std::string &base64str);
548 void write_uri_field(std::ostream &o, const char *uri, const http_parser_url &u,
557 std::string numeric_name(const struct sockaddr *sa, socklen_t salen);
563 std::string to_numeric_addr(const Address *addr);
565 std::string to_numeric_addr(const struct sockaddr *sa, socklen_t salen);
572 std::string ascii_dump(const uint8_t *data, size_t len);
586 bool check_path(const std::string &path);
607 std::vector<std::string> proto_list);
611 std::vector<unsigned char> get_default_alpn();
616 std::vector<std::string> parse_config_str_list(const StringRef &s,
622 std::vector<StringRef> split_str(const StringRef &s, char delim);
627 std::vector<StringRef> split_str(const StringRef &s, char delim, size_t n);
632 // type of |tp| is std::chrono::time_point. This function returns
637 std::chrono::duration_cast<std::chrono::seconds>(tp.time_since_epoch());
645 // Expected type of |tp| is std::chrono::time_point
646 template <typename T> std::string format_iso8601(const T &tp) {
647 auto t = std::chrono::duration_cast<std::chrono::milliseconds>(
656 // std::chrono::time_point. This function returns StringRef wrapping
659 auto t = std::chrono::duration_cast<std::chrono::milliseconds>(
669 // NULL byte. Expected type of |tp| is std::chrono::time_point. This
673 auto t = std::chrono::duration_cast<std::chrono::milliseconds>(
683 // |tp| is std::chrono::time_point. This function returns StringRef
688 std::chrono::duration_cast<std::chrono::seconds>(tp.time_since_epoch());
697 std::chrono::duration<Rep, std::nano> duration = typename Clock::duration(1);
703 template <typename Duration = std::chrono::steady_clock::duration>
705 return std::chrono::duration_cast<Duration>(std::chrono::duration<double>(d));
709 return std::chrono::duration<double>(d).count();
747 int64_t parse_uint(const std::string &s);
756 // std::numeric_limits<double>::infinity() if error occurs.
766 std::string duration_str(double t);
772 std::string format_duration(const std::chrono::microseconds &u);
775 std::string format_duration(double t);
797 p = std::copy(std::begin(host), std::end(host), p);
805 p = std::copy(std::begin(serv), std::end(serv), p);
832 p = std::copy(std::begin(host), std::end(host), p);
869 int read_mime_types(std::map<std::string, std::string> &res,
880 std::uniform_int_distribution<> dis(0, 26 * 2 + 10 - 1);
890 std::uniform_int_distribution<uint8_t> dis;
891 std::generate(first, last, [&dis, &gen]() { return dis(gen); });
899 auto len = std::distance(first, last);
905 auto dis = std::uniform_int_distribution<unsigned int>(i, len - 1);
916 return std::copy_n(s, N - 1, it);
942 std::pair<StringRef, StringRef> split_hostport(const StringRef &hostport);
944 // Returns new std::mt19937 object.
945 std::mt19937 make_mt19937();