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

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

Issue 2140353002: Move StringView constructors into WTFString.h/AtomicString.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constructor. Created 4 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 | « third_party/WebKit/Source/wtf/text/StringViewTest.cpp ('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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 12 matching lines...) Expand all
23 #define WTFString_h 23 #define WTFString_h
24 24
25 // This file would be called String.h, but that conflicts with <string.h> 25 // This file would be called String.h, but that conflicts with <string.h>
26 // on systems without case-sensitive file systems. 26 // on systems without case-sensitive file systems.
27 27
28 #include "wtf/Allocator.h" 28 #include "wtf/Allocator.h"
29 #include "wtf/HashTableDeletedValueType.h" 29 #include "wtf/HashTableDeletedValueType.h"
30 #include "wtf/WTFExport.h" 30 #include "wtf/WTFExport.h"
31 #include "wtf/text/ASCIIFastPath.h" 31 #include "wtf/text/ASCIIFastPath.h"
32 #include "wtf/text/StringImpl.h" 32 #include "wtf/text/StringImpl.h"
33 #include "wtf/text/StringView.h"
33 #include <algorithm> 34 #include <algorithm>
34 #include <iosfwd> 35 #include <iosfwd>
35 36
36 #ifdef __OBJC__ 37 #ifdef __OBJC__
37 #include <objc/objc.h> 38 #include <objc/objc.h>
38 #endif 39 #endif
39 40
40 namespace WTF { 41 namespace WTF {
41 42
42 class CString; 43 class CString;
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 633
633 // Shared global empty string. 634 // Shared global empty string.
634 WTF_EXPORT const String& emptyString(); 635 WTF_EXPORT const String& emptyString();
635 WTF_EXPORT const String& emptyString16Bit(); 636 WTF_EXPORT const String& emptyString16Bit();
636 WTF_EXPORT extern const String& xmlnsWithColon; 637 WTF_EXPORT extern const String& xmlnsWithColon;
637 638
638 // Pretty printer for gtest and base/logging.*. It prepends and appends 639 // Pretty printer for gtest and base/logging.*. It prepends and appends
639 // double-quotes, and escapes chracters other than ASCII printables. 640 // double-quotes, and escapes chracters other than ASCII printables.
640 WTF_EXPORT std::ostream& operator<<(std::ostream&, const String&); 641 WTF_EXPORT std::ostream& operator<<(std::ostream&, const String&);
641 642
643 inline StringView::StringView(const String& string, unsigned offset, unsigned le ngth)
644 : StringView(string.impl(), offset, length) {}
645 inline StringView::StringView(const String& string, unsigned offset)
646 : StringView(string.impl(), offset) {}
647 inline StringView::StringView(const String& string)
648 : StringView(string.impl()) {}
649
642 } // namespace WTF 650 } // namespace WTF
643 651
644 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String); 652 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String);
645 653
646 using WTF::CString; 654 using WTF::CString;
647 using WTF::KeepTrailingZeros; 655 using WTF::KeepTrailingZeros;
648 using WTF::StrictUTF8Conversion; 656 using WTF::StrictUTF8Conversion;
649 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; 657 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD;
650 using WTF::String; 658 using WTF::String;
651 using WTF::emptyString; 659 using WTF::emptyString;
652 using WTF::emptyString16Bit; 660 using WTF::emptyString16Bit;
653 using WTF::append; 661 using WTF::append;
654 using WTF::charactersAreAllASCII; 662 using WTF::charactersAreAllASCII;
655 using WTF::equal; 663 using WTF::equal;
656 using WTF::equalIgnoringCase; 664 using WTF::equalIgnoringCase;
657 using WTF::find; 665 using WTF::find;
658 using WTF::isAllSpecialCharacters; 666 using WTF::isAllSpecialCharacters;
659 using WTF::isSpaceOrNewline; 667 using WTF::isSpaceOrNewline;
660 using WTF::reverseFind; 668 using WTF::reverseFind;
661 669
662 #include "wtf/text/AtomicString.h" 670 #include "wtf/text/AtomicString.h"
663 #endif // WTFString_h 671 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698