|
||||
File indexing completed on 2025-01-17 09:56:14
0001 // Copyright 2022 Google LLC 0002 // 0003 // Use of this source code is governed by an MIT-style 0004 // license that can be found in the LICENSE file or at 0005 // https://opensource.org/licenses/MIT. 0006 0007 #ifndef THIRD_PARTY_UTF8_RANGE_UTF8_VALIDITY_H_ 0008 #define THIRD_PARTY_UTF8_RANGE_UTF8_VALIDITY_H_ 0009 0010 #include <cstddef> 0011 0012 #include "absl/strings/string_view.h" 0013 0014 namespace utf8_range { 0015 0016 // Returns true if the sequence of characters is a valid UTF-8 sequence. 0017 bool IsStructurallyValid(absl::string_view str); 0018 0019 // Returns the length in bytes of the prefix of str that is all 0020 // structurally valid UTF-8. 0021 size_t SpanStructurallyValid(absl::string_view str); 0022 0023 } // namespace utf8_range 0024 0025 #endif // THIRD_PARTY_UTF8_RANGE_UTF8_VALIDITY_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |