Index: src/conversions.cc |
diff --git a/src/conversions.cc b/src/conversions.cc |
index 9c52d41e5d3f42bc0deda9ac1ebd70059da1f00a..1d5ed35f93c83510146bb4bf518bbc51347d8672 100644 |
--- a/src/conversions.cc |
+++ b/src/conversions.cc |
@@ -56,7 +56,7 @@ double StringToDouble(UnicodeCache* unicode_cache, |
double StringToDouble(UnicodeCache* unicode_cache, |
- Vector<const char> str, |
+ Vector<const uint8_t> str, |
int flags, |
double empty_string_val) { |
// We cast to const uint8_t* here to avoid instantiating the |
@@ -78,6 +78,23 @@ double StringToDouble(UnicodeCache* unicode_cache, |
} |
+// Converts a string into an integer. |
+double StringToInt(UnicodeCache* unicode_cache, |
+ Vector<const uint8_t> vector, |
+ int radix) { |
+ return InternalStringToInt( |
+ unicode_cache, vector.start(), vector.start() + vector.length(), radix); |
+} |
+ |
+ |
+double StringToInt(UnicodeCache* unicode_cache, |
+ Vector<const uc16> vector, |
+ int radix) { |
+ return InternalStringToInt( |
+ unicode_cache, vector.start(), vector.start() + vector.length(), radix); |
+} |
+ |
+ |
const char* DoubleToCString(double v, Vector<char> buffer) { |
switch (fpclassify(v)) { |
case FP_NAN: return "NaN"; |