Lines Matching defs:string
12 size_t kNotFound = std::string::npos;
16 const std::string_view string) {
18 if (!string.empty()) {
20 simdutf::utf16_length_from_utf8(string.data(), string.length());
24 string.data(), string.length(), buffer.out());
26 // if the input was a valid UTF-8 string.
37 std::unique_ptr<Value> parseJSON(const std::string_view string) {
38 if (string.empty())
41 simdutf::utf16_length_from_utf8(string.data(), string.length());
45 string.data(), string.length(), buffer.out());
47 // if the input was a valid UTF-8 string.
54 std::unique_ptr<Value> parseJSON(v8_inspector::StringView string) {
55 if (string.length() == 0)
57 if (string.is8Bit())
58 return parseJSONCharacters(string.characters8(), string.length());
59 return parseJSONCharacters(string.characters16(), string.length());
66 return std::string(reinterpret_cast<const char*>(view.characters8()),
78 // if the input was a valid UTF-16 string. Otherwise, utf8_length
81 // An invalid UTF-16 input will generate the empty string:
93 std::istringstream stream(std::string(buffer, length));
116 return std::string(reinterpret_cast<const char*>(message.data()),
121 return std::string(reinterpret_cast<const char*>(data), length);
133 // if the input was a valid UTF-16 string. Otherwise, utf8_length
136 // An invalid UTF-16 input will generate the empty string:
147 // (characters) in the string, assuming that the string is valid Unicode.