nis-util  1.0.D108
Functions
lib/boolean.cc File Reference
#include <lib/ac/string.h>
#include <lib/boolean.h>
#include <lib/sizeof.h>

Go to the source code of this file.

Functions

const char * string_from_boolean (bool value)
bool boolean_from_string (const rcstring &text, bool &value)
bool boolean_from_string (const char *text, bool &value)

Function Documentation

bool boolean_from_string ( const rcstring text,
bool &  value 
)

The boolean_from_string function is used to convert a text string to a boolean value, if possible.

Parameters:
textthe text to be examined an converted
valuethe retured boolean value, when successful
Returns:
true if a boolean value was found, false if could not be converted to a boolean value

Definition at line 32 of file boolean.cc.

bool boolean_from_string ( const char *  text,
bool &  value 
)

The boolean_from_string function is used to convert a text string to a boolean value, if possible.

Parameters:
textthe text to be examined an converted
valuethe retured boolean value, when successful
Returns:
true if a boolean value was found, false if could not be converted to a boolean value

Definition at line 39 of file boolean.cc.

const char* string_from_boolean ( bool  value)

The string_from_boolean function is used to convert a boolean value into a string, for printing (etc).

Definition at line 25 of file boolean.cc.