#include <zxcvbn/util.hpp> #include <algorithm> #include <string> #include <utility> #include <cassert> #include "base/strings/string_util.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" namespace zxcvbn { namespace util { bool utf8_valid(std::string::const_iterator start, std::string::const_iterator end) { … } bool utf8_valid(const std::string & str) { … } std::string ascii_lower(const std::string & in) { … } std::string reverse_string(const std::string & in) { … } template<class It> std::pair<char32_t, It> _utf8_decode(It it, It end) { … } template<class It> It _utf8_iter(It start, It end) { … } std::string::iterator utf8_iter(std::string::iterator start, std::string::iterator end) { … } std::string::const_iterator utf8_iter(std::string::const_iterator start, std::string::const_iterator end) { … } std::string::size_type character_len(const std::string & str, std::string::size_type start, std::string::size_type end) { … } std::string::size_type character_len(const std::string & str) { … } char32_t utf8_decode(const std::string & start, std::string::size_type & idx) { … } } }