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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringImpl.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 PassRefPtr<StringImpl> lower(); 331 PassRefPtr<StringImpl> lower();
332 PassRefPtr<StringImpl> lowerASCII(); 332 PassRefPtr<StringImpl> lowerASCII();
333 PassRefPtr<StringImpl> upper(); 333 PassRefPtr<StringImpl> upper();
334 PassRefPtr<StringImpl> lower(const AtomicString& localeIdentifier); 334 PassRefPtr<StringImpl> lower(const AtomicString& localeIdentifier);
335 PassRefPtr<StringImpl> upper(const AtomicString& localeIdentifier); 335 PassRefPtr<StringImpl> upper(const AtomicString& localeIdentifier);
336 336
337 PassRefPtr<StringImpl> fill(UChar); 337 PassRefPtr<StringImpl> fill(UChar);
338 // FIXME: Do we need fill(char) or can we just do the right thing if UChar i s ASCII? 338 // FIXME: Do we need fill(char) or can we just do the right thing if UChar i s ASCII?
339 PassRefPtr<StringImpl> foldCase(); 339 PassRefPtr<StringImpl> foldCase();
340 340
341 PassRefPtr<StringImpl> truncate(unsigned length);
342
341 PassRefPtr<StringImpl> stripWhiteSpace(); 343 PassRefPtr<StringImpl> stripWhiteSpace();
342 PassRefPtr<StringImpl> stripWhiteSpace(IsWhiteSpaceFunctionPtr); 344 PassRefPtr<StringImpl> stripWhiteSpace(IsWhiteSpaceFunctionPtr);
343 PassRefPtr<StringImpl> simplifyWhiteSpace(StripBehavior = StripExtraWhiteSpa ce); 345 PassRefPtr<StringImpl> simplifyWhiteSpace(StripBehavior = StripExtraWhiteSpa ce);
344 PassRefPtr<StringImpl> simplifyWhiteSpace(IsWhiteSpaceFunctionPtr, StripBeha vior = StripExtraWhiteSpace); 346 PassRefPtr<StringImpl> simplifyWhiteSpace(IsWhiteSpaceFunctionPtr, StripBeha vior = StripExtraWhiteSpace);
345 347
346 PassRefPtr<StringImpl> removeCharacters(CharacterMatchFunctionPtr); 348 PassRefPtr<StringImpl> removeCharacters(CharacterMatchFunctionPtr);
347 template <typename CharType> 349 template <typename CharType>
348 ALWAYS_INLINE PassRefPtr<StringImpl> removeCharacters(const CharType* charac ters, CharacterMatchFunctionPtr); 350 ALWAYS_INLINE PassRefPtr<StringImpl> removeCharacters(const CharType* charac ters, CharacterMatchFunctionPtr);
349 351
350 // Remove characters between [start, start+lengthToRemove). The range is 352 // Remove characters between [start, start+lengthToRemove). The range is
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 using WTF::TextCaseASCIIInsensitive; 748 using WTF::TextCaseASCIIInsensitive;
747 using WTF::TextCaseInsensitive; 749 using WTF::TextCaseInsensitive;
748 using WTF::TextCaseSensitive; 750 using WTF::TextCaseSensitive;
749 using WTF::TextCaseSensitivity; 751 using WTF::TextCaseSensitivity;
750 using WTF::equal; 752 using WTF::equal;
751 using WTF::equalNonNull; 753 using WTF::equalNonNull;
752 using WTF::lengthOfNullTerminatedString; 754 using WTF::lengthOfNullTerminatedString;
753 using WTF::reverseFind; 755 using WTF::reverseFind;
754 756
755 #endif 757 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698