mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
18 lines
308 B
C++
18 lines
308 B
C++
// A folly::StringPiece stub.
|
|
|
|
#include <cstring>
|
|
|
|
namespace folly {
|
|
class StringPiece {
|
|
public:
|
|
explicit StringPiece(const char *s) : data_(s), size_(std::strlen(s)) {}
|
|
|
|
const char* data() const { return "foo"; }
|
|
size_t size() const { return 3; }
|
|
|
|
private:
|
|
const char *data_;
|
|
size_t size_;
|
|
};
|
|
}
|