Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

util_str.h File Reference

string utility functions More...

Go to the source code of this file.

Functions

int str2int (char *str, int *ret, int allow_negative)
int toggle_option (char *name, char *value, int *opt_value)


Detailed Description

string utility functions

Author:
Chris Green <cmg@sourcefire.com>
Date:
Fri Jun 27 10:34:37 2003
some string handling wrappers

Definition in file util_str.h.


Function Documentation

int str2int char *  str,
int *  ret,
int  allow_negative
 

Convert a string to an int and check for problems

Parameters:
str string to parse as an int
ret return value for the int
allow_negative allow negative values
Returns:
0 on sucess, else failure

Definition at line 30 of file util_str.c.

References strtol().

int toggle_option char *  name,
char *  value,
int *  opt_value
 

Set opt_value to 1 if the value is on, 0 if it's off

Parameters:
name option name to configure (not used but useful for debugging)
value value to configure (should be either on or off )
opt_value ptr to integer to configure
Returns:
0 on success , else failure

Definition at line 70 of file util_str.c.

References strcasecmp.

Referenced by FlowPSParseOption().


Generated on Sun May 14 14:51:27 2006 by  doxygen 1.4.2