]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ustrfmt.c
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / common / ustrfmt.c
index 81b778c1b0f659699bebf354704c1eaa583a6afc..5e9fb924f8d3ffb0c08b8dc1273c1b31da511adb 100644 (file)
@@ -1,42 +1,13 @@
 /*
 **********************************************************************
-*   Copyright (C) 2001-2004, International Business Machines
+*   Copyright (C) 2001-2006, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 */
 
 #include "cstring.h"
 #include "ustrfmt.h"
-#include <stdio.h>
 
-U_CAPI char*  U_EXPORT2
-uprv_dtostr(double value, char *buffer, int maximumDigits,UBool fixedPoint)
-{
-    char *itrPtr = buffer + 1;  /* skip '-' or a number before the decimal */
-    char *startPtr;
-
-    sprintf(buffer,"%f",value);
-
-    /* Find the decimal point.
-       Some unusal machines use a comma when the system locale changes
-    */
-    while (isalnum(*itrPtr)) {
-        itrPtr++;
-    }
-    *itrPtr = '.';
-
-    /* truncate trailing zeros, except the one after '.' */
-    startPtr = itrPtr + 1;
-    itrPtr = uprv_strchr(startPtr, 0);
-    while(--itrPtr > startPtr){
-        if(*itrPtr == '0'){
-            *itrPtr = 0;
-        }else{
-            break;
-        }
-    }
-    return buffer;
-}
 
 /***
  * Fills in a UChar* string with the radix-based representation of a