nullable_string16.cc 489 Bytes
Newer Older
gejun's avatar
gejun committed
1 2 3 4
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
#include "butil/strings/nullable_string16.h"
gejun's avatar
gejun committed
6 7 8

#include <ostream>

9
#include "butil/strings/utf_string_conversions.h"
gejun's avatar
gejun committed
10

11
namespace butil {
gejun's avatar
gejun committed
12 13 14 15 16

std::ostream& operator<<(std::ostream& out, const NullableString16& value) {
  return value.is_null() ? out << "(null)" : out << UTF16ToUTF8(value.string());
}

17
}  // namespace butil