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

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

Issue 2956603002: Add StringBuilder::erase(index) (Closed)
Patch Set: Removed last character optimization Created 3 years, 5 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/platform/wtf/text/StringBuilder.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) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 void AppendNumber(int); 140 void AppendNumber(int);
141 void AppendNumber(unsigned); 141 void AppendNumber(unsigned);
142 void AppendNumber(long); 142 void AppendNumber(long);
143 void AppendNumber(unsigned long); 143 void AppendNumber(unsigned long);
144 void AppendNumber(long long); 144 void AppendNumber(long long);
145 void AppendNumber(unsigned long long); 145 void AppendNumber(unsigned long long);
146 void AppendNumber(double, unsigned precision = 6); 146 void AppendNumber(double, unsigned precision = 6);
147 147
148 void erase(unsigned);
149
148 String ToString(); 150 String ToString();
149 AtomicString ToAtomicString(); 151 AtomicString ToAtomicString();
150 String Substring(unsigned start, unsigned length) const; 152 String Substring(unsigned start, unsigned length) const;
151 153
152 unsigned length() const { return length_; } 154 unsigned length() const { return length_; }
153 bool IsEmpty() const { return !length_; } 155 bool IsEmpty() const { return !length_; }
154 156
155 unsigned Capacity() const; 157 unsigned Capacity() const;
156 void ReserveCapacity(unsigned new_capacity); 158 void ReserveCapacity(unsigned new_capacity);
157 159
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 296 }
295 inline bool operator!=(const String& a, const StringBuilder& b) { 297 inline bool operator!=(const String& a, const StringBuilder& b) {
296 return !Equal(b, a); 298 return !Equal(b, a);
297 } 299 }
298 300
299 } // namespace WTF 301 } // namespace WTF
300 302
301 using WTF::StringBuilder; 303 using WTF::StringBuilder;
302 304
303 #endif // StringBuilder_h 305 #endif // StringBuilder_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/wtf/text/StringBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698