smtk::string Class Reference

string utilities More...

List of all members.

Public Member Functions

virtual ~string (void)
 destructor

Static Public Member Functions

static bool is_diff (int n, const char *s1, const char *s2)
 do two strings differ in first n chars?
static bool is_diff (const char *s1, const char *s2)
 do two strings differ?
static bool is_diff_case (const char *s1, const char *s2)
 do two strings differ, ignoring case?
static bool is_same (int n, const char *s1, const char *s2)
 are two strings the same in first n chars?
static bool is_same (const char *s1, const char *s2)
 are two strings the same?
static bool is_same_case (const char *s1, const char *s2)
 are two strings the same, ignoring case?


Detailed Description

string utilities

String stuff used internal to the SmTk API.


Member Function Documentation

static bool smtk::string::is_diff ( int  n,
const char *  s1,
const char *  s2 
) [inline, static]

do two strings differ in first n chars?

is_diff() compares two strings s1 and s2. is_diff() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a faster replacement for strcmp(3) when all you need to know is if the strings differ or not.

Parameters:
n is the number of characters to compare at most.
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns false if s1 and s2 are strings of the same characters up to n characters or true if not. Returns false if both s1 and s2 are NULL (0) pointers, and true if just one is.

static bool smtk::string::is_diff ( const char *  s1,
const char *  s2 
) [inline, static]

do two strings differ?

is_diff() compares two strings s1 and s2. is_diff() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a little faster replacement for strcmp(3) when all you need to know is if the strings differ or not.

Parameters:
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns false if s1 and s2 are strings of the same length and have all the same characters or true if not. Returns false if both s1 and s2 are NULL (0) pointers, and true if just one is.

static bool smtk::string::is_diff_case ( const char *  s1,
const char *  s2 
) [inline, static]

do two strings differ, ignoring case?

is_diff_case() compares two strings s1 and s2. is_diff_case() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a faster replacement for strcmp(3) when all you need to know is if the strings differ or not.

This compares the characters using ASCII (ISO 646).

Parameters:
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns false if s1 and s2 are strings of the same length and have all the same characters, ignoring case or true if not. Returns false if both s1 and s2 are NULL (0) pointers, and true if just one is.

static bool smtk::string::is_same ( int  n,
const char *  s1,
const char *  s2 
) [inline, static]

are two strings the same in first n chars?

is_same() compares two strings s1 and s2. is_same() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a faster replacement for strcmp(3) when all you need to know is if the strings are the same or not.

Parameters:
n is the number of characters to compare.
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns true if s1 and s2 are the same up to n characters or false if not. Returns true if both s1 and s2 are NULL (0) pointers, and false if just one is.

static bool smtk::string::is_same ( const char *  s1,
const char *  s2 
) [inline, static]

are two strings the same?

is_same() compares two strings s1 and s2. is_same() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a faster replacement for strcmp(3) when all you need to know is if the strings are the same or not.

Parameters:
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns true if s1 and s2 are the same length and have all the same characters or false if not. Returns true if both s1 and s2 are NULL (0) pointers, and false if just one is.

static bool smtk::string::is_same_case ( const char *  s1,
const char *  s2 
) [inline, static]

are two strings the same, ignoring case?

is_same_case() compares two strings s1 and s2. is_same_case() does not look at all characters in the strings, but just what is necessary to determine the return value. This maybe a faster replacement for strcasecmp(3) when all you need to know is if the strings are the same or not.

This compares the characters using ASCII (ISO 646).

Parameters:
s1 a pointer to a string whose contents will not be changed
s2 a pointer to a string whose contents will not be changed
Returns:
Returns true if s1 and s2 are the same length and have all the same characters, ignoring case or false if not. Returns true if both s1 and s2 are NULL (0) pointers, and false if just one is.


The documentation for this class was generated from the following files:
Generated on Sat Aug 11 22:25:58 2007 for Simulation Toolkit (SmTk) by  doxygen 1.5.2