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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void append(UChar32 c) | 134 void append(UChar32 c) |
135 { | 135 { |
136 if (U_IS_BMP(c)) { | 136 if (U_IS_BMP(c)) { |
137 append(static_cast<UChar>(c)); | 137 append(static_cast<UChar>(c)); |
138 return; | 138 return; |
139 } | 139 } |
140 append(U16_LEAD(c)); | 140 append(U16_LEAD(c)); |
141 append(U16_TRAIL(c)); | 141 append(U16_TRAIL(c)); |
142 } | 142 } |
143 | 143 |
144 template<unsigned charactersCount> | |
145 ALWAYS_INLINE void appendLiteral(const char (&characters)[charactersCount])
{ append(characters, charactersCount - 1); } | |
146 | |
147 void appendNumber(int); | 144 void appendNumber(int); |
148 void appendNumber(unsigned); | 145 void appendNumber(unsigned); |
149 void appendNumber(long); | 146 void appendNumber(long); |
150 void appendNumber(unsigned long); | 147 void appendNumber(unsigned long); |
151 void appendNumber(long long); | 148 void appendNumber(long long); |
152 void appendNumber(unsigned long long); | 149 void appendNumber(unsigned long long); |
153 void appendNumber(double, unsigned precision = 6, TrailingZerosTruncatingPol
icy = TruncateTrailingZeros); | 150 void appendNumber(double, unsigned precision = 6, TrailingZerosTruncatingPol
icy = TruncateTrailingZeros); |
154 | 151 |
155 String toString() | 152 String toString() |
156 { | 153 { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a
, b); } | 368 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a
, b); } |
372 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal(
a, b); } | 369 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal(
a, b); } |
373 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b
, a); } | 370 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b
, a); } |
374 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal(
b, a); } | 371 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal(
b, a); } |
375 | 372 |
376 } // namespace WTF | 373 } // namespace WTF |
377 | 374 |
378 using WTF::StringBuilder; | 375 using WTF::StringBuilder; |
379 | 376 |
380 #endif // StringBuilder_h | 377 #endif // StringBuilder_h |
OLD | NEW |