| OLD | NEW |
| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef WTFString_h | 23 #ifndef WTFString_h |
| 24 #define WTFString_h | 24 #define WTFString_h |
| 25 | 25 |
| 26 // This file would be called String.h, but that conflicts with <string.h> | 26 // This file would be called String.h, but that conflicts with <string.h> |
| 27 // on systems without case-sensitive file systems. | 27 // on systems without case-sensitive file systems. |
| 28 | 28 |
| 29 #include "wtf/Allocator.h" | 29 #include "wtf/Allocator.h" |
| 30 #include "wtf/Compiler.h" |
| 30 #include "wtf/HashTableDeletedValueType.h" | 31 #include "wtf/HashTableDeletedValueType.h" |
| 31 #include "wtf/WTFExport.h" | 32 #include "wtf/WTFExport.h" |
| 32 #include "wtf/text/ASCIIFastPath.h" | 33 #include "wtf/text/ASCIIFastPath.h" |
| 33 #include "wtf/text/StringImpl.h" | 34 #include "wtf/text/StringImpl.h" |
| 34 #include "wtf/text/StringView.h" | 35 #include "wtf/text/StringView.h" |
| 35 #include <algorithm> | 36 #include <algorithm> |
| 36 #include <iosfwd> | 37 #include <iosfwd> |
| 37 | 38 |
| 38 #ifdef __OBJC__ | 39 #ifdef __OBJC__ |
| 39 #include <objc/objc.h> | 40 #include <objc/objc.h> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 String simplifyWhiteSpace(IsWhiteSpaceFunctionPtr, | 299 String simplifyWhiteSpace(IsWhiteSpaceFunctionPtr, |
| 299 StripBehavior = StripExtraWhiteSpace) const; | 300 StripBehavior = StripExtraWhiteSpace) const; |
| 300 | 301 |
| 301 String removeCharacters(CharacterMatchFunctionPtr) const; | 302 String removeCharacters(CharacterMatchFunctionPtr) const; |
| 302 template <bool isSpecialCharacter(UChar)> | 303 template <bool isSpecialCharacter(UChar)> |
| 303 bool isAllSpecialCharacters() const; | 304 bool isAllSpecialCharacters() const; |
| 304 | 305 |
| 305 // Return the string with case folded for case insensitive comparison. | 306 // Return the string with case folded for case insensitive comparison. |
| 306 String foldCase() const; | 307 String foldCase() const; |
| 307 | 308 |
| 308 static String format(const char*, ...) WTF_ATTRIBUTE_PRINTF(1, 2); | 309 PRINTF_FORMAT(1, 2) static String format(const char*, ...); |
| 309 | 310 |
| 310 // Returns an uninitialized string. The characters needs to be written | 311 // Returns an uninitialized string. The characters needs to be written |
| 311 // into the buffer returned in data before the returned string is used. | 312 // into the buffer returned in data before the returned string is used. |
| 312 // Failure to do this will have unpredictable results. | 313 // Failure to do this will have unpredictable results. |
| 313 static String createUninitialized(unsigned length, UChar*& data) { | 314 static String createUninitialized(unsigned length, UChar*& data) { |
| 314 return StringImpl::createUninitialized(length, data); | 315 return StringImpl::createUninitialized(length, data); |
| 315 } | 316 } |
| 316 static String createUninitialized(unsigned length, LChar*& data) { | 317 static String createUninitialized(unsigned length, LChar*& data) { |
| 317 return StringImpl::createUninitialized(length, data); | 318 return StringImpl::createUninitialized(length, data); |
| 318 } | 319 } |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 using WTF::emptyString; | 653 using WTF::emptyString; |
| 653 using WTF::emptyString16Bit; | 654 using WTF::emptyString16Bit; |
| 654 using WTF::charactersAreAllASCII; | 655 using WTF::charactersAreAllASCII; |
| 655 using WTF::equal; | 656 using WTF::equal; |
| 656 using WTF::find; | 657 using WTF::find; |
| 657 using WTF::isAllSpecialCharacters; | 658 using WTF::isAllSpecialCharacters; |
| 658 using WTF::isSpaceOrNewline; | 659 using WTF::isSpaceOrNewline; |
| 659 | 660 |
| 660 #include "wtf/text/AtomicString.h" | 661 #include "wtf/text/AtomicString.h" |
| 661 #endif // WTFString_h | 662 #endif // WTFString_h |
| OLD | NEW |