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

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

Issue 2500723002: Add UTF-16 string literal constructors to String classes (Closed)
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.h ('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 /* 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // will return the empty string. 77 // will return the empty string.
78 // NOTE: This is different from String(vector.data(), vector.size()) 78 // NOTE: This is different from String(vector.data(), vector.size())
79 // which will sometimes return a null string when vector.data() is null 79 // which will sometimes return a null string when vector.data() is null
80 // which can only occur for vectors without inline capacity. 80 // which can only occur for vectors without inline capacity.
81 // See: https://bugs.webkit.org/show_bug.cgi?id=109792 81 // See: https://bugs.webkit.org/show_bug.cgi?id=109792
82 template <size_t inlineCapacity> 82 template <size_t inlineCapacity>
83 explicit String(const Vector<UChar, inlineCapacity>&); 83 explicit String(const Vector<UChar, inlineCapacity>&);
84 84
85 // Construct a string with UTF-16 data, from a null-terminated source. 85 // Construct a string with UTF-16 data, from a null-terminated source.
86 String(const UChar*); 86 String(const UChar*);
87 String(const char16_t* cstr) : String(reinterpret_cast<const UChar*>(cstr)) {}
esprehn 2016/11/14 02:24:15 chars
87 88
88 // Construct a string with latin1 data. 89 // Construct a string with latin1 data.
89 String(const LChar* characters, unsigned length); 90 String(const LChar* characters, unsigned length);
90 String(const char* characters, unsigned length); 91 String(const char* characters, unsigned length);
91 92
92 // Construct a string with latin1 data, from a null-terminated source. 93 // Construct a string with latin1 data, from a null-terminated source.
93 String(const LChar* characters); 94 String(const LChar* characters);
94 String(const char* characters); 95 String(const char* characters);
95 96
96 // Construct a string referencing an existing StringImpl. 97 // Construct a string referencing an existing StringImpl.
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 using WTF::emptyString; 646 using WTF::emptyString;
646 using WTF::emptyString16Bit; 647 using WTF::emptyString16Bit;
647 using WTF::charactersAreAllASCII; 648 using WTF::charactersAreAllASCII;
648 using WTF::equal; 649 using WTF::equal;
649 using WTF::find; 650 using WTF::find;
650 using WTF::isAllSpecialCharacters; 651 using WTF::isAllSpecialCharacters;
651 using WTF::isSpaceOrNewline; 652 using WTF::isSpaceOrNewline;
652 653
653 #include "wtf/text/AtomicString.h" 654 #include "wtf/text/AtomicString.h"
654 #endif // WTFString_h 655 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698