OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include <algorithm> |
| 6 |
| 7 #include "helper_functions.h" |
| 8 |
| 9 namespace hello_world { |
| 10 |
| 11 int32_t FortyTwo() { |
| 12 return 42; |
| 13 } |
| 14 |
| 15 std::string ReverseText(const std::string& text) { |
| 16 std::string reversed_string(text); |
| 17 // Use reverse to reverse |reversed_string| in place. |
| 18 std::reverse(reversed_string.begin(), reversed_string.end()); |
| 19 return reversed_string; |
| 20 } |
| 21 } // namespace hello_world |
| 22 |
OLD | NEW |