dart-sdk/runtime/vm/double_conversion.h
vegorov@google.com a273179ac8 Use locale insensitive method to parse double literals.
Using strtod does not work because Dart grammar does not necessary match grammar used by strtod. Some locales (e.g. Russian and Danish) use comma instead of dot for radix point.

R=iposva@google.com
BUG=

Review URL: https://codereview.chromium.org//13529014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21074 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 14:32:46 +00:00

23 lines
741 B
C++

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef VM_DOUBLE_CONVERSION_H_
#define VM_DOUBLE_CONVERSION_H_
#include "vm/globals.h"
#include "vm/object.h"
namespace dart {
void DoubleToCString(double d, char* buffer, int buffer_size);
RawString* DoubleToStringAsFixed(double d, int fraction_digits);
RawString* DoubleToStringAsExponential(double d, int fraction_digits);
RawString* DoubleToStringAsPrecision(double d, int precision);
bool CStringToDouble(const char* str, intptr_t length, double* result);
} // namespace dart
#endif // VM_DOUBLE_CONVERSION_H_