OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file implements utility functions for eliding and formatting UI text. | 5 // This file implements utility functions for eliding and formatting UI text. |
6 // | 6 // |
7 // Note that several of the functions declared in text_elider.h are implemented | 7 // Note that several of the functions declared in text_elider.h are implemented |
8 // in this file using helper classes in the anonymous namespace. | 8 // in this file using helper classes in the unnamed namespace. |
sky
2012/07/23 15:52:13
'in the' -> 'in an'
| |
9 | 9 |
10 #include "ui/base/text/text_elider.h" | 10 #include "ui/base/text/text_elider.h" |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
16 #include "base/i18n/break_iterator.h" | 16 #include "base/i18n/break_iterator.h" |
17 #include "base/i18n/char_iterator.h" | 17 #include "base/i18n/char_iterator.h" |
18 #include "base/i18n/rtl.h" | 18 #include "base/i18n/rtl.h" |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1114 index = char_iterator.getIndex(); | 1114 index = char_iterator.getIndex(); |
1115 } else { | 1115 } else { |
1116 // String has leading whitespace, return the elide string. | 1116 // String has leading whitespace, return the elide string. |
1117 return kElideString; | 1117 return kElideString; |
1118 } | 1118 } |
1119 } | 1119 } |
1120 return string.substr(0, index) + kElideString; | 1120 return string.substr(0, index) + kElideString; |
1121 } | 1121 } |
1122 | 1122 |
1123 } // namespace ui | 1123 } // namespace ui |
OLD | NEW |