Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 #ifndef IOS_WEB_PUBLIC_STRING_UTIL_H_ | |
| 6 #define IOS_WEB_PUBLIC_STRING_UTIL_H_ | |
| 7 | |
| 8 #include "base/strings/string16.h" | |
| 9 | |
| 10 namespace web { | |
| 11 | |
| 12 // Truncates |contents| to |length|. | |
| 13 // Returns a string terminated at the last space to ensure no words are | |
| 14 // clipped. | |
| 15 // Note: This function uses spaces as word boundaries and may not handle all | |
| 16 // languages correctly. | |
| 17 base::string16 GetStringByClippingLastWord(const base::string16& contents, | |
|
stuartmorgan
2014/12/04 23:22:58
We should revisit this at some point to figure out
droger
2014/12/09 13:14:43
I agree.
This function has only one caller, and it
| |
| 18 size_t length); | |
| 19 | |
| 20 } // namespace web | |
| 21 | |
| 22 #endif // IOS_WEB_PUBLIC_STRING_UTIL_H_ | |
| OLD | NEW |