- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Utils::Lang::CharUtils Class Reference

List of all members.

## Static Public Member Functions
static char * | strdupnew (char const *str)
static int | stricmp (const char *str1, const char *str2)
static int | strnicmp (const char *str1, const char *str2, int n)

## Detailed Description

Definition at line 28 of file CharUtils.h.

## Member Function Documentation

char * CharUtils::strdupnew | ( | char const * | str | ) | `[static]`

Copies the string using the new[] operator.

Parameters:

  | str | the string being copied.

Returns:
  a duplicate of the string.

Definition at line 23 of file CharUtils.cpp.

Referenced by Mers::Executives::DeductiveController::Observation::DomainLookupNodeData::setName().

int CharUtils::stricmp | ( | const char * | str1,
|  | const char * | str2 |
| ) |  |  | `[static]`

Does a case insensitive string comparison between the two strings. The return value is 0 if they are equal, ignoring case. The return value is less than 0 if they first string is alphabetically before the second and greater than zero if the first is alphabetically after the second.

Parameters:

  | str1 | The first string being compared.
  | str2 | The second string being compared.

Returns:
  0 if str1 == str2, ignoring case. < 0 if str1 is before str2, ignoring case. > 0 if str1 is after str2, ignoring case.

Definition at line 42 of file CharUtils.cpp.

int CharUtils::strnicmp | ( | const char * | str1,
|  | const char * | str2,
|  | int | n |
| ) |  |  | `[static]`

Does a case insensitive string comparison between the two strings, comparing the first n characters. The return value is 0 if they are equal up to the first n characters, ignoring case. The return value is less than 0 if they first string is alphabetically before the second and greater than zero if the first is alphabetically after the second, comparing only the first n characters.

Parameters:

  | str1 | The first string being compared.
  | str2 | The second string being compared.
  | n | The number of characters to compare.

Returns:
  0 if str1[0..n) == str2[0..n), ignoring case. < 0 if str1[0..n] is before str2[0..n), ignoring case. > 0 if str1[0..n) is after str2[0..n), ignoring case.

Definition at line 60 of file CharUtils.cpp.

The documentation for this class was generated from the following files:

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Lang/CharUtils.h
- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Lang/CharUtils.cpp