GCpp general purpose C++ library  version 1.0
GStringFunctions.cpp File Reference
#include "GStringFunctions.hh"
#include "GBaseFunctions.hh"

Functions

string GGetString (const int64 val, const u_int len, const char c)
 
string GGetString (const u_int64 val, const u_int len, const char c)
 
string GGetString (const int val, const u_int len, const char c)
 
string GGetString (const u_int val, const u_int len, const char c)
 
string GGetString (const float val, const u_int len, const u_int prec, const char c)
 
string GGetString (const double val, const u_int len, const u_int prec, const char c)
 
string GGetString (const float val, const char *fmt, const char c)
 
string GGetString (const double val, const char *fmt, const char c)
 
string GGetStringHexa (const u_int64 data)
 
string GGetStringHexa (const u_int data)
 
string GGetStringHexa (const u_short data)
 
string GGetStringHexa (const byte data)
 
string GGetStringHexa (const void *data)
 
string GGetStringBin (const u_int64 data)
 
string GGetStringBin (const u_int data)
 
string GGetStringBin (const u_short data)
 
string GGetStringBin (const byte data)
 

Detailed Description

Source file for various string functions

Function Documentation

string GGetString ( const u_int64  val,
const u_int  len,
const char  c 
)

Formatted writting of an integer in a string.

Parameters
valvalue to be written
lenoutput string length
cfilling character
string GGetString ( const int  val,
const u_int  len,
const char  c 
)

Formatted writting of an integer in a string.

Parameters
valvalue to be written
lenoutput string length
cfilling character
string GGetString ( const u_int  val,
const u_int  len,
const char  c 
)

Formatted writting of an integer in a string.

Parameters
valvalue to be written
lenoutput string length
cfilling character
string GGetString ( const float  val,
const u_int  len,
const u_int  prec,
const char  c 
)

Formatted writting of real value in a string. The function uses a C-style g format; in order to use a f format, use GGetString(float,char*,char) function..

Parameters
valvalue to be written
lenoutput string length
precformat precision
cfilling character
string GGetString ( const double  val,
const u_int  len,
const u_int  prec,
const char  c 
)

Formatted writting of real value in a string. The function uses a C-style g format; in order to use a f format, use GGetString(float,char*,char) function..

Parameters
valvalue to be written
lenoutput string length
precformat precision
cfilling character
string GGetString ( const float  val,
const char *  fmt,
const char  c 
)

Formatted writting of real value in a string using a C-style format.

Parameters
valvalue to be written
fmtC-style format (f or g)
cfilling character
string GGetString ( const double  val,
const char *  fmt,
const char  c 
)

Formatted writting of real value in a string using a C-style format.

Parameters
valvalue to be written
fmtC-style format (f or g)
cfilling character
string GGetStringBin ( const u_int64  data)

Binary writting of a 64 bits integer value in a string. (WORKS ONLY FOR 32 BITS !!!)

Parameters
datavalue to be written
string GGetStringBin ( const u_int  data)

Binary writting of a 32 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringBin ( const u_short  data)

Binary writting of a 16 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringBin ( const byte  data)

Binary writting of a 8 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringHexa ( const u_int64  data)

Hexadecimal writting of a 64 bits integer value in a string.

Parameters
datavalue to be written

Referenced by GListT< T >::__Add(), GSortListT< T >::__AddSorted(), GListT< T >::__Insert(), GGetString(), and GBaseSampleFFT::Read().

string GGetStringHexa ( const u_int  data)

Hexadecimal writting of a 32 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringHexa ( const u_short  data)

Hexadecimal writting of a 16 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringHexa ( const byte  data)

Hexadecimal writting of a 8 bits integer value in a string.

Parameters
datavalue to be written
string GGetStringHexa ( const void *  data)

Hexadecimal writting of a pointer in a string.

Parameters
datavalue to be written