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

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

Issue 2610163004: Use StringView for String::split. (Closed)
Patch Set: Created 3 years, 11 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/WTFString.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 * (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. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
4 * All rights reserved. 4 * 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // Returns an uninitialized string. The characters needs to be written 308 // Returns an uninitialized string. The characters needs to be written
309 // into the buffer returned in data before the returned string is used. 309 // into the buffer returned in data before the returned string is used.
310 // Failure to do this will have unpredictable results. 310 // Failure to do this will have unpredictable results.
311 static String createUninitialized(unsigned length, UChar*& data) { 311 static String createUninitialized(unsigned length, UChar*& data) {
312 return StringImpl::createUninitialized(length, data); 312 return StringImpl::createUninitialized(length, data);
313 } 313 }
314 static String createUninitialized(unsigned length, LChar*& data) { 314 static String createUninitialized(unsigned length, LChar*& data) {
315 return StringImpl::createUninitialized(length, data); 315 return StringImpl::createUninitialized(length, data);
316 } 316 }
317 317
318 void split(const String& separator, 318 void split(const StringView& separator,
319 bool allowEmptyEntries, 319 bool allowEmptyEntries,
320 Vector<String>& result) const; 320 Vector<String>& result) const;
321 void split(const String& separator, Vector<String>& result) const { 321 void split(const StringView& separator, Vector<String>& result) const {
322 split(separator, false, result); 322 split(separator, false, result);
323 } 323 }
324 void split(UChar separator, 324 void split(UChar separator,
325 bool allowEmptyEntries, 325 bool allowEmptyEntries,
326 Vector<String>& result) const; 326 Vector<String>& result) const;
327 void split(UChar separator, Vector<String>& result) const { 327 void split(UChar separator, Vector<String>& result) const {
328 split(separator, false, result); 328 split(separator, false, result);
329 } 329 }
330 330
331 // Copy characters out of the string. See StringImpl.h for detailed docs. 331 // Copy characters out of the string. See StringImpl.h for detailed docs.
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 using WTF::String; 630 using WTF::String;
631 using WTF::emptyString; 631 using WTF::emptyString;
632 using WTF::emptyString16Bit; 632 using WTF::emptyString16Bit;
633 using WTF::charactersAreAllASCII; 633 using WTF::charactersAreAllASCII;
634 using WTF::equal; 634 using WTF::equal;
635 using WTF::find; 635 using WTF::find;
636 using WTF::isSpaceOrNewline; 636 using WTF::isSpaceOrNewline;
637 637
638 #include "wtf/text/AtomicString.h" 638 #include "wtf/text/AtomicString.h"
639 #endif // WTFString_h 639 #endif // WTFString_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/WTFString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698