Open CASCADE Technology  7.7.0
Functions
Standard_CString.hxx File Reference

Functions working with plain C strings. More...

#include <Standard_Macro.hxx>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>

Functions

double Atof (const char *theStr)
 Equivalent of standard C function atof() that always uses C locale. More...
 
double Strtod (const char *theStr, char **theNextPtr)
 Optimized equivalent of standard C function strtod() that always uses C locale. More...
 
int Printf (const char *theFormat,...)
 Equivalent of standard C function printf() that always uses C locale. More...
 
int Fprintf (FILE *theFile, const char *theFormat,...)
 Equivalent of standard C function fprintf() that always uses C locale. More...
 
int Sprintf (char *theBuffer, const char *theFormat,...)
 Equivalent of standard C function sprintf() that always uses C locale. More...
 
int Vsprintf (char *theBuffer, const char *theFormat, va_list theArgList)
 Equivalent of standard C function vsprintf() that always uses C locale. Note that this function does not check buffer bounds and should be used with precaution measures (only with format fitting into the buffer of known size). More...
 

Detailed Description

Functions working with plain C strings.

Function Documentation

◆ Atof()

double Atof ( const char *  theStr)

Equivalent of standard C function atof() that always uses C locale.

◆ Fprintf()

int Fprintf ( FILE *  theFile,
const char *  theFormat,
  ... 
)

Equivalent of standard C function fprintf() that always uses C locale.

◆ Printf()

int Printf ( const char *  theFormat,
  ... 
)

Equivalent of standard C function printf() that always uses C locale.

◆ Sprintf()

int Sprintf ( char *  theBuffer,
const char *  theFormat,
  ... 
)

Equivalent of standard C function sprintf() that always uses C locale.

◆ Strtod()

double Strtod ( const char *  theStr,
char **  theNextPtr 
)

Optimized equivalent of standard C function strtod() that always uses C locale.

◆ Vsprintf()

int Vsprintf ( char *  theBuffer,
const char *  theFormat,
va_list  theArgList 
)

Equivalent of standard C function vsprintf() that always uses C locale. Note that this function does not check buffer bounds and should be used with precaution measures (only with format fitting into the buffer of known size).

Parameters
theBuffer[in] [out] string buffer to fill
theFormat[in] format to apply
theArgList[in] argument list for specified format
Returns
the total number of characters written, or a negative number on error