#include <CNCL/FormInt.h>
CN_FORMINT
CNString
This class converts Integers to Strings using different kinds of format
styles provided by the stream-2.0-implementation. The current formats
implemented in this class are 'left' and 'right'.
Note: If the Integer needs more characters than the width w
indicates, the most right ones are ignored.
Constructors:
CNFormInt();
CNFormInt(CNParam *param);
CNFormInt(int a, int w);
CNFormInt(int a, int w, char fill);
CNFormInt(int a, int w, char fill, int f);
CNFormInt
, setting the value to the integer value a
(default = 0), the string's width, the fill character fill (default = ' ')
and the format f (default = CNFormInt::right)
The different formats implemented in CNFormInt
are:
int right = 1
int left = 2
In addition to the member functions required by CNCL, CNFormInt
provides:
int get_value();
int value();
void set_value(int a);
void value(int a);
char get_fill();
char fill();
void set_fill(char f);
void fill(char f);
int get_format();
int format();
void set_format(int f);
void format(int f);
int get_width();
int width();
void set_width(int w);
void width(int w);
Go to the first, previous, next, last section, table of contents.