e45bf6a603
Editor::copy() now writes into a buffer provided by the client. Editor::text() now returns a series of `pair<const char*, size_t>` instead of `const StringSlice&` Change-Id: Iff298dd7a80aaad19f9326d10c5b67bea5ef8e22 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232579 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
20 lines
371 B
C++
20 lines
371 B
C++
// Copyright 2019 Google LLC.
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
#ifndef stringview_DEFINED
|
|
#define stringview_DEFINED
|
|
|
|
#include <cstddef>
|
|
|
|
namespace editor {
|
|
|
|
template <typename T>
|
|
struct Span {
|
|
T* data;
|
|
std::size_t size;
|
|
};
|
|
|
|
using StringView = Span<const char>;
|
|
|
|
}
|
|
#endif // stringview_DEFINED
|