mqtt_cpp
string_check.hpp
Go to the documentation of this file.
1 // Copyright Takatoshi Kondo 2015
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #if !defined(MQTT_STRING_CHECK_HPP)
8 #define MQTT_STRING_CHECK_HPP
9 
10 #include <mqtt/namespace.hpp>
12 #include <mqtt/exception.hpp>
13 #include <mqtt/string_view.hpp>
15 
16 namespace as = boost::asio;
17 
18 namespace MQTT_NS {
19 
20 inline void utf8string_check(string_view str) {
22  auto r = utf8string::validate_contents(str);
25  }
26 }
27 
28 inline void utf8string_check(as::const_buffer str) {
30 }
31 
32 } // namespace MQTT_NS
33 
34 #endif // MQTT_STRING_CHECK_HPP
@ well_formed
UTF-8 string is well_formed. See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3....
constexpr bool is_valid_length(string_view str)
Definition: utf8encoded_strings.hpp:42
constexpr validation validate_contents(string_view str)
Definition: utf8encoded_strings.hpp:47
Definition: any.hpp:27
boost::string_ref string_view
Definition: string_view.hpp:64
void utf8string_check(string_view str)
Definition: string_check.hpp:20
char const * get_pointer(as::const_buffer const &cb)
Definition: const_buffer_util.hpp:17
std::size_t get_size(as::const_buffer const &cb)
Definition: const_buffer_util.hpp:21
Definition: buffer.hpp:242
Definition: exception.hpp:51
Definition: exception.hpp:45