Index: Source/wtf/text/AtomicString.cpp |
diff --git a/Source/wtf/text/AtomicString.cpp b/Source/wtf/text/AtomicString.cpp |
index c753e3686d165b08e45f666982ad537ef9c5afb8..1a2f1e2b06b3ead89270860432bdfea8e4035148 100644 |
--- a/Source/wtf/text/AtomicString.cpp |
+++ b/Source/wtf/text/AtomicString.cpp |
@@ -26,6 +26,8 @@ |
#include "StringHash.h" |
#include "wtf/HashSet.h" |
#include "wtf/WTFThreadData.h" |
+#include "wtf/dtoa.h" |
+#include "wtf/text/IntegerToStringConversion.h" |
#include "wtf/unicode/UTF8.h" |
namespace WTF { |
@@ -487,6 +489,42 @@ AtomicString AtomicString::fromUTF8Internal(const char* charactersStart, const c |
return atomicString; |
} |
+AtomicString AtomicString::number(int number) |
+{ |
+ return numberToStringSigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(unsigned number) |
+{ |
+ return numberToStringUnsigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(long number) |
+{ |
+ return numberToStringSigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(unsigned long number) |
+{ |
+ return numberToStringUnsigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(long long number) |
+{ |
+ return numberToStringSigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(unsigned long long number) |
+{ |
+ return numberToStringUnsigned<AtomicString>(number); |
+} |
+ |
+AtomicString AtomicString::number(double number, unsigned precision, TrailingZerosTruncatingPolicy trailingZerosTruncatingPolicy) |
+{ |
+ NumberToStringBuffer buffer; |
+ return AtomicString(numberToFixedPrecisionString(number, precision, buffer, trailingZerosTruncatingPolicy == TruncateTrailingZeros)); |
+} |
+ |
#ifndef NDEBUG |
void AtomicString::show() const |
{ |