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

Side by Side Diff: base/string_piece.cc

Issue 9730: NO CODE CHANGE. Update string_piece.h to new include style. Really just wan... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/string_piece.h ('k') | base/string_piece_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Copied from strings/stringpiece.cc with modifications 4 // Copied from strings/stringpiece.cc with modifications
5 5
6 #include <algorithm> 6 #include <algorithm>
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return npos; 206 return npos;
207 } 207 }
208 208
209 StringPiece StringPiece::substr(size_type pos, size_type n) const { 209 StringPiece StringPiece::substr(size_type pos, size_type n) const {
210 if (pos > length_) pos = length_; 210 if (pos > length_) pos = length_;
211 if (n > length_ - pos) n = length_ - pos; 211 if (n > length_ - pos) n = length_ - pos;
212 return StringPiece(ptr_ + pos, n); 212 return StringPiece(ptr_ + pos, n);
213 } 213 }
214 214
215 const StringPiece::size_type StringPiece::npos = size_type(-1); 215 const StringPiece::size_type StringPiece::npos = size_type(-1);
216
OLDNEW
« no previous file with comments | « base/string_piece.h ('k') | base/string_piece_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698