1
/*------------------------------------------------------------------------------
2
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
4
* Distributable under the terms of either the Apache License (Version 2.0) or
5
* the GNU Lesser General Public License, as specified in the COPYING file.
6
------------------------------------------------------------------------------*/
8
#include "CLucene/_SharedHeader.h"
9
#include "CLucene/util/Misc.h"
12
double lucene_tcstod(const TCHAR *value, TCHAR **end){
13
int32_t len = _tcslen(value)+1;
14
char* avalue=_CL_NEWARRAY(char,len);
16
STRCPY_TtoA(avalue,value,len);
18
double ret = strtod(avalue,&aend);
19
*end=(TCHAR*)value+(aend-avalue);
20
_CLDELETE_CaARRAY(avalue);