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

Side by Side Diff: base/strings/string_util.cc

Issue 1291103002: Updates to StringSplit implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « base/strings/string_split.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 4
5 #include "base/strings/string_util.h" 5 #include "base/strings/string_util.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <math.h> 9 #include <math.h>
10 #include <stdarg.h> 10 #include <stdarg.h>
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 else 393 else
394 output->clear(); 394 output->clear();
395 } 395 }
396 396
397 TrimPositions TrimWhitespace(const string16& input, 397 TrimPositions TrimWhitespace(const string16& input,
398 TrimPositions positions, 398 TrimPositions positions,
399 string16* output) { 399 string16* output) {
400 return TrimStringT(input, StringPiece16(kWhitespaceUTF16), positions, output); 400 return TrimStringT(input, StringPiece16(kWhitespaceUTF16), positions, output);
401 } 401 }
402 402
403 StringPiece16 TrimWhitespaceASCII(StringPiece16 input, 403 StringPiece16 TrimWhitespace(StringPiece16 input,
404 TrimPositions positions) { 404 TrimPositions positions) {
405 return TrimStringPieceT(input, StringPiece16(kWhitespaceUTF16), positions); 405 return TrimStringPieceT(input, StringPiece16(kWhitespaceUTF16), positions);
406 } 406 }
407 407
408 TrimPositions TrimWhitespaceASCII(const std::string& input, 408 TrimPositions TrimWhitespaceASCII(const std::string& input,
409 TrimPositions positions, 409 TrimPositions positions,
410 std::string* output) { 410 std::string* output) {
411 return TrimStringT(input, StringPiece(kWhitespaceASCII), positions, output); 411 return TrimStringT(input, StringPiece(kWhitespaceASCII), positions, output);
412 } 412 }
413 413
414 StringPiece TrimWhitespaceASCII(StringPiece input, TrimPositions positions) { 414 StringPiece TrimWhitespaceASCII(StringPiece input, TrimPositions positions) {
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 } // namespace 1000 } // namespace
1001 1001
1002 size_t strlcpy(char* dst, const char* src, size_t dst_size) { 1002 size_t strlcpy(char* dst, const char* src, size_t dst_size) {
1003 return lcpyT<char>(dst, src, dst_size); 1003 return lcpyT<char>(dst, src, dst_size);
1004 } 1004 }
1005 size_t wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) { 1005 size_t wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) {
1006 return lcpyT<wchar_t>(dst, src, dst_size); 1006 return lcpyT<wchar_t>(dst, src, dst_size);
1007 } 1007 }
1008 1008
1009 } // namespace base 1009 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/string_split.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698