Objective Systems, Inc.  

ooUtils.h File Reference

This file contains general utility functions. More...

#include "ootypes.h"

Go to the source code of this file.

Functions

EXTERN const char * ooUtilsGetText (OOUINT32 idx, const char **table, size_t tabsiz)
 Get text from a text table for a given enumeration index.
EXTERN OOBOOL ooUtilsIsStrEmpty (const char *str)
 Test if given string value is empty.
EXTERN OOBOOL ooIsDialedDigit (const char *str)
 Test if given string value is digit string.
EXTERN int ooUtilsTextToBool (const char *str, OOBOOL *pbool)
 This function converts a text string to a boolean value.


Detailed Description

This file contains general utility functions.

Definition in file ooUtils.h.


Function Documentation

EXTERN const char* ooUtilsGetText ( OOUINT32  idx,
const char **  table,
size_t  tabsiz 
)

Get text from a text table for a given enumeration index.

Parameters:
idx Index of item in table
table The table containing the text items
tabsiz Number of items in the table
Returns:
Text for item or '?' if idx outside bounds of table

EXTERN OOBOOL ooUtilsIsStrEmpty ( const char *  str  ) 

Test if given string value is empty.

String is considered to empty if value is NULL or there are no characters in string (strlen == 0).

Parameters:
str String to test
Returns:
TRUE if string empty; FALSE otherwise

EXTERN OOBOOL ooIsDialedDigit ( const char *  str  ) 

Test if given string value is digit string.

Parameters:
str String to test
Returns:
TRUE if string contains all digits; FALSE otherwise

EXTERN int ooUtilsTextToBool ( const char *  str,
OOBOOL pbool 
)

This function converts a text string to a boolean value.

The values "true", "yes", and "1" are interpreted to be true and "false", "no", and "0" to be false. The string comparsion is case-insensitive, therefore TRUE, trUe, etc. will all be interpreted to be true.

Parameters:
str String value to test.
pbool Pointer to boolean result value.
Returns:
OO_OK (0) if boolean value could be determined; OO_FAILED if invalid text was provided.


This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1