| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 template<unsigned charactersCount> | 166 template<unsigned charactersCount> |
| 167 ALWAYS_INLINE void appendLiteral(const char (&characters)[charactersCount])
{ append(characters, charactersCount - 1); } | 167 ALWAYS_INLINE void appendLiteral(const char (&characters)[charactersCount])
{ append(characters, charactersCount - 1); } |
| 168 | 168 |
| 169 void appendNumber(int); | 169 void appendNumber(int); |
| 170 void appendNumber(unsigned); | 170 void appendNumber(unsigned); |
| 171 void appendNumber(long); | 171 void appendNumber(long); |
| 172 void appendNumber(unsigned long); | 172 void appendNumber(unsigned long); |
| 173 void appendNumber(long long); | 173 void appendNumber(long long); |
| 174 void appendNumber(unsigned long long); | 174 void appendNumber(unsigned long long); |
| 175 void appendNumber(double, unsigned precision = 6, TrailingZerosTruncatingPol
icy = TruncateTrailingZeros); |
| 175 | 176 |
| 176 String toString() | 177 String toString() |
| 177 { | 178 { |
| 178 shrinkToFit(); | 179 shrinkToFit(); |
| 179 if (m_string.isNull()) | 180 if (m_string.isNull()) |
| 180 reifyString(); | 181 reifyString(); |
| 181 return m_string; | 182 return m_string; |
| 182 } | 183 } |
| 183 | 184 |
| 184 String substring(unsigned position, unsigned length) const | 185 String substring(unsigned position, unsigned length) const |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a
, b); } | 393 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a
, b); } |
| 393 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal(
a, b); } | 394 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal(
a, b); } |
| 394 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b
, a); } | 395 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b
, a); } |
| 395 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal(
b, a); } | 396 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal(
b, a); } |
| 396 | 397 |
| 397 } // namespace WTF | 398 } // namespace WTF |
| 398 | 399 |
| 399 using WTF::StringBuilder; | 400 using WTF::StringBuilder; |
| 400 | 401 |
| 401 #endif // StringBuilder_h | 402 #endif // StringBuilder_h |
| OLD | NEW |