OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 { return m_string.endsWith<matchLength>(prefix, caseSensitive); } | 131 { return m_string.endsWith<matchLength>(prefix, caseSensitive); } |
132 | 132 |
133 AtomicString lower() const; | 133 AtomicString lower() const; |
134 AtomicString upper() const { return AtomicString(impl()->upper()); } | 134 AtomicString upper() const { return AtomicString(impl()->upper()); } |
135 | 135 |
136 int toInt(bool* ok = 0) const { return m_string.toInt(ok); } | 136 int toInt(bool* ok = 0) const { return m_string.toInt(ok); } |
137 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); } | 137 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); } |
138 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); } | 138 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); } |
139 bool percentage(int& p) const { return m_string.percentage(p); } | 139 bool percentage(int& p) const { return m_string.percentage(p); } |
140 | 140 |
| 141 static AtomicString number(int); |
| 142 static AtomicString number(unsigned); |
| 143 static AtomicString number(long); |
| 144 static AtomicString number(unsigned long); |
| 145 static AtomicString number(long long); |
| 146 static AtomicString number(unsigned long long); |
| 147 |
| 148 static AtomicString number(double, unsigned precision = 6, TrailingZerosTrun
catingPolicy = TruncateTrailingZeros); |
| 149 |
141 bool isNull() const { return m_string.isNull(); } | 150 bool isNull() const { return m_string.isNull(); } |
142 bool isEmpty() const { return m_string.isEmpty(); } | 151 bool isEmpty() const { return m_string.isEmpty(); } |
143 | 152 |
144 static void remove(StringImpl*); | 153 static void remove(StringImpl*); |
145 | 154 |
146 #if USE(CF) | 155 #if USE(CF) |
147 AtomicString(CFStringRef s) : m_string(add(s)) { } | 156 AtomicString(CFStringRef s) : m_string(add(s)) { } |
148 #endif | 157 #endif |
149 #ifdef __OBJC__ | 158 #ifdef __OBJC__ |
150 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } | 159 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 using WTF::textAtom; | 266 using WTF::textAtom; |
258 using WTF::commentAtom; | 267 using WTF::commentAtom; |
259 using WTF::starAtom; | 268 using WTF::starAtom; |
260 using WTF::xmlAtom; | 269 using WTF::xmlAtom; |
261 using WTF::xmlnsAtom; | 270 using WTF::xmlnsAtom; |
262 using WTF::xlinkAtom; | 271 using WTF::xlinkAtom; |
263 #endif | 272 #endif |
264 | 273 |
265 #include "wtf/text/StringConcatenate.h" | 274 #include "wtf/text/StringConcatenate.h" |
266 #endif // AtomicString_h | 275 #endif // AtomicString_h |
OLD | NEW |