Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: third_party/WebKit/Source/wtf/text/WTFString.h

Issue 2337683002: Move String::truncate to StringImpl. (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 void fill(UChar c) 241 void fill(UChar c)
242 { 242 {
243 if (m_impl) 243 if (m_impl)
244 m_impl = m_impl->fill(c); 244 m_impl = m_impl->fill(c);
245 } 245 }
246 246
247 void ensure16Bit(); 247 void ensure16Bit();
248 248
249 void truncate(unsigned len); 249 void truncate(unsigned length);
250 void remove(unsigned start, unsigned length = 1); 250 void remove(unsigned start, unsigned length = 1);
251 251
252 String substring(unsigned pos, unsigned len = UINT_MAX) const; 252 String substring(unsigned pos, unsigned len = UINT_MAX) const;
253 String left(unsigned len) const { return substring(0, len); } 253 String left(unsigned len) const { return substring(0, len); }
254 String right(unsigned len) const { return substring(length() - len, len); } 254 String right(unsigned len) const { return substring(length() - len, len); }
255 255
256 // Returns a lowercase/uppercase version of the string 256 // Returns a lowercase/uppercase version of the string
257 String lower() const; 257 String lower() const;
258 String upper() const; 258 String upper() const;
259 259
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 using WTF::emptyString; 555 using WTF::emptyString;
556 using WTF::emptyString16Bit; 556 using WTF::emptyString16Bit;
557 using WTF::charactersAreAllASCII; 557 using WTF::charactersAreAllASCII;
558 using WTF::equal; 558 using WTF::equal;
559 using WTF::find; 559 using WTF::find;
560 using WTF::isAllSpecialCharacters; 560 using WTF::isAllSpecialCharacters;
561 using WTF::isSpaceOrNewline; 561 using WTF::isSpaceOrNewline;
562 562
563 #include "wtf/text/AtomicString.h" 563 #include "wtf/text/AtomicString.h"
564 #endif // WTFString_h 564 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.cpp ('k') | third_party/WebKit/Source/wtf/text/WTFString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698