| 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.
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 m_impl = m_impl->replace(a.impl(), b.impl()); | 313 m_impl = m_impl->replace(a.impl(), b.impl()); |
| 314 return *this; | 314 return *this; |
| 315 } | 315 } |
| 316 String& replace(unsigned index, unsigned len, const String& b) | 316 String& replace(unsigned index, unsigned len, const String& b) |
| 317 { | 317 { |
| 318 if (m_impl) | 318 if (m_impl) |
| 319 m_impl = m_impl->replace(index, len, b.impl()); | 319 m_impl = m_impl->replace(index, len, b.impl()); |
| 320 return *this; | 320 return *this; |
| 321 } | 321 } |
| 322 | 322 |
| 323 template<unsigned charactersCount> | 323 ALWAYS_INLINE String& replace(UChar a, const char* characters) |
| 324 ALWAYS_INLINE String& replaceWithLiteral(UChar a, const char (&characters)[c
haractersCount]) | |
| 325 { | 324 { |
| 325 ASSERT(characters); |
| 326 if (m_impl) | 326 if (m_impl) |
| 327 m_impl = m_impl->replace(a, characters, charactersCount - 1); | 327 m_impl = m_impl->replace(a, characters, strlen(characters)); |
| 328 | |
| 329 return *this; | 328 return *this; |
| 330 } | 329 } |
| 331 | 330 |
| 332 void fill(UChar c) | 331 void fill(UChar c) |
| 333 { | 332 { |
| 334 if (m_impl) | 333 if (m_impl) |
| 335 m_impl = m_impl->fill(c); | 334 m_impl = m_impl->fill(c); |
| 336 } | 335 } |
| 337 | 336 |
| 338 void ensure16Bit(); | 337 void ensure16Bit(); |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 using WTF::charactersToFloat; | 704 using WTF::charactersToFloat; |
| 706 using WTF::equal; | 705 using WTF::equal; |
| 707 using WTF::equalIgnoringCase; | 706 using WTF::equalIgnoringCase; |
| 708 using WTF::find; | 707 using WTF::find; |
| 709 using WTF::isAllSpecialCharacters; | 708 using WTF::isAllSpecialCharacters; |
| 710 using WTF::isSpaceOrNewline; | 709 using WTF::isSpaceOrNewline; |
| 711 using WTF::reverseFind; | 710 using WTF::reverseFind; |
| 712 | 711 |
| 713 #include "wtf/text/AtomicString.h" | 712 #include "wtf/text/AtomicString.h" |
| 714 #endif // WTFString_h | 713 #endif // WTFString_h |
| OLD | NEW |