[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/c/string/byte/strtof [Back]  [Original]

strtof, strtod, strtold cppreference.com
cppreference.com

strtof, strtod, strtold

cppreference.com
< c | string | byte

<metanoindex/>

<tbody> </tbody>
<stdlib.h>
float strtof( const char* str, char** str_end );
( C99)
double strtod( const char* str, char** str_end );
long double strtold( const char* str, char** str_end );
( C99)
, str.
:
Interprets a floating point value in a byte string pointed to by str.
Google.
. .

( isspace), . , . :

  • . :
  • ()
  • , ( C) ( )
  • () e E, ( 10)
  • . :
  • ()
  • 0x 0X
  • , ( C) ( )
  • () p P, ( 2)
  • . :
  • ()
  • INF INFINITY
  • . :
  • ()
  • NAN NAN( ) NAN. , . NaN .
( C99)
  • , C
str_end . str_end NULL, .
:
The functions sets the pointer pointed to by str_end to point to the character past the last character interpreted. If str_end is NULL, it is ignored.
Google.
. .

str
:
pointer to the null-terminated byte string to be interpreted
Google.
. .
str_end
.
:
pointer to a pointer to character.
Google.
. .

, str . , HUGE_VAL, HUGE_VALF HUGE_VALL . , 0 .
:
Floating point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned.
Google.
. .

.


() []
C++ strtof, strtod, strtold

Web Proxy Viewer  |  New URL  |  Original Page