1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ENCODINGS_COMPACT_LANG_DET_STRING_BYTE_SINK_H_
6 #define ENCODINGS_COMPACT_LANG_DET_STRING_BYTE_SINK_H_
10 #include <unicode/unistr.h>
12 // Implementation of a string byte sink needed when ICU is compiled without
13 // support for std::string which is the case on Android.
14 class StringByteSink : public icu::ByteSink {
16 // Constructs a ByteSink that will append bytes to the dest string.
17 explicit StringByteSink(std::string* dest);
18 virtual ~StringByteSink();
20 virtual void Append(const char* data, int32_t n);
23 std::string* const dest_;
26 #endif // ENCODINGS_COMPACT_LANG_DET_STRING_BYTE_SINK_H_