================ @@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( + const char *str, size_t length, Terminator &terminator); + +RT_API_ATTRS std::size_t LengthWithoutTrailingSpaces(const Descriptor &d); + +// Returns the length of the \p string. Assumes \p string is valid. ---------------- klausler wrote:
The comment doesn't specify how the length of the string is defined. If it is NUL terminated, how is this different from `std::strlen()`? https://github.com/llvm/llvm-project/pull/74077 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits