summaryrefslogtreecommitdiff
path: root/chromium/ui/gfx/range/range.cc
blob: 2776f3d75effc99258b64900be6d0e666297033c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2012 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.

#include "ui/gfx/range/range.h"

#include <inttypes.h>

#include <algorithm>

#include "base/strings/stringprintf.h"

namespace gfx {

std::string Range::ToString() const {
  return base::StringPrintf("{%" PRIu32 ",%" PRIu32 "}", start(), end());
}

std::ostream& operator<<(std::ostream& os, const Range& range) {
  return os << range.ToString();
}

}  // namespace gfx