| 136 | } |
| 137 | |
| 138 | void SourceContentView::AppendToString(std::string& dest) const { |
| 139 | absl::visit(absl::Overload( |
| 140 | [&dest](absl::Span<const char> view) { |
| 141 | dest.append(view.data(), view.size()); |
| 142 | }, |
| 143 | [&dest](absl::Span<const uint8_t> view) { |
| 144 | for (const auto& code_point : view) { |
| 145 | internal::Utf8Encode(dest, code_point); |
| 146 | } |
| 147 | }, |
| 148 | [&dest](absl::Span<const char16_t> view) { |
| 149 | for (const auto& code_point : view) { |
| 150 | internal::Utf8Encode(dest, code_point); |
| 151 | } |
| 152 | }, |
| 153 | [&dest](absl::Span<const char32_t> view) { |
| 154 | for (const auto& code_point : view) { |
| 155 | internal::Utf8Encode(dest, code_point); |
| 156 | } |
| 157 | }), |
| 158 | view_); |
| 159 | } |
| 160 | |
| 161 | namespace common_internal { |
| 162 |
nothing calls this directly
no test coverage detected