* Copy a source string to a destination C StringView. * * If the `dest` has insufficient `capacity` to hold the `src` string, * then the string is truncated at `capacity` characters. * * @param dest Target string. * @param src Source string. */
| 20 | * @param src Source string. |
| 21 | */ |
| 22 | inline void assignStringView(oa_StringView* dest, const std::string_view src) { |
| 23 | dest->size = std::min(src.size(), dest->capacity); |
| 24 | std::memcpy(dest->data, src.data(), dest->size); |
| 25 | } |
| 26 | } // namespace OPENASSETIO_CORE_ABI_VERSION |
| 27 | } // namespace openassetio |
no outgoing calls
no test coverage detected