#include <stlsoft/string/char_traits.hpp>
C | The character type | |
N | The integer type | |
Z | The size type |
Public Types | |
typedef C | char_type |
The char type. | |
typedef stlsoft_char_traits< C > | class_type |
The current parameterisation of the type. | |
typedef int | int_type |
The integer type. | |
typedef size_t | size_type |
The size type. | |
typedef ss_streampos_t | pos_type |
The position type. | |
typedef ss_streamoff_t | off_type |
The offset type. | |
Static Public Member Functions | |
static void | assign (char_type &lhs, char_type const &rhs) |
Assigns rhs to lhs . | |
static char_type * | assign (char_type *dest, size_type cch, char_type const &c) |
Assigns cch characters of value c to dest . | |
static bool | eq (char_type const &lhs, char_type const &rhs) |
Evaluates whether lhs is equivalent to rhs . | |
static bool | lt (char_type const &lhs, char_type const &rhs) |
Evaluates whether lhs is less than rhs . | |
static int_type | compare (char_type const *s1, char_type const *s2, size_type cch) |
Compares cch characters of s1 with s2 . | |
static int_type | compare_max (char_type const *s1, char_type const *s2, size_type cch) |
static int_type | compare_null (char_type const *s1, char_type const *s2, size_type cch) |
Compares, using compare(), s1 with s2 , either or both of which may be null . | |
static int_type | compare_maxnull (char_type const *s1, char_type const *s2, size_type cch) |
Compares, using compare_max(), s1 with s2 , either or both of which may be null . | |
static size_type | length (char_type const *s) |
Evaluates the length of the string s . | |
static size_type | length_null (char_type const *s) |
Evaluates the length of the string s , which may be null . | |
static size_type | length_max (char_type const *s, size_type limit) |
Evaluates the length of the string s up to a given number of characters. | |
static size_type | length_max_null (char_type const *s, size_type limit) |
Evaluates the length of the string s , which may be null , up to a given number of characters. | |
static char_type * | copy (char_type *dest, char_type const *src, size_type cch) |
Copies cch characters from src to dest . | |
static char_type * | move (char_type *dest, char_type const *src, size_type cch) |
Copies cch characters from src to dest , accounting for whether the ranges overlap. | |
static char_type const * | find (char_type const *s, size_type cch, char_type const &c) |
Finds the first c in cch elements in s , or NULL if not found. | |
static char_type | to_char_type (int_type const &c) |
Represents the character in the character type char_type . | |
static int_type | to_int_type (char_type const &c) |
Represents the character in the integer type int_type . | |
static bool | eq_int_type (int_type const &lhs, int_type const &rhs) |
Evaluates whether lhs and rhs are equivalent. | |
static int_type | eof () |
Returns the value representing the end-of-file. | |
static int_type | not_eof (int_type const &c) |
Evaluates whether the given character is the end-of-file. |
typedef C char_type |
typedef stlsoft_char_traits<C> class_type |
The current parameterisation of the type.
Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.
typedef ss_streampos_t pos_type |
typedef ss_streamoff_t off_type |
Assigns rhs
to lhs
.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits_safe::assign(), stlsoft_char_traits::assign(), stlsoft_char_traits::copy(), and stlsoft_char_traits::move().
Assigns cch
characters of value c
to dest
.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::assign(), and STLSOFT_MESSAGE_ASSERT.
Evaluates whether lhs
is equivalent to rhs
.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits::compare(), stlsoft_char_traits_safe::eq(), stlsoft_char_traits::find(), stlsoft_char_traits::length(), and stlsoft_char_traits::length_max().
Evaluates whether lhs
is less than rhs
.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits::compare(), and stlsoft_char_traits_safe::lt().
static int_type compare | ( | char_type const * | s1, | |
char_type const * | s2, | |||
size_type | cch | |||
) | [inline, static] |
Compares cch
characters of s1
with s2
.
s1 | The first string to compare | |
s2 | The second string to compare | |
cch | The number of characters to compare s1 with s2 |
<0 | s1 is lexicographically less than s2 | |
0 | s1 is lexicographically equal to s2 | |
>0 | s1 is lexicographically more than s2 |
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::eq(), stlsoft_char_traits::lt(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::compare_null(), and stlsoft_char_traits::compare_null().
static int_type compare_null | ( | char_type const * | s1, | |
char_type const * | s2, | |||
size_type | cch | |||
) | [inline, static] |
Compares, using compare(), s1
with s2
, either or both of which may be null
.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::compare().
static int_type compare_maxnull | ( | char_type const * | s1, | |
char_type const * | s2, | |||
size_type | cch | |||
) | [inline, static] |
Compares, using compare_max(), s1
with s2
, either or both of which may be null
.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits_safe::compare_maxnull().
Evaluates the length of the string s
.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::eq(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::length_null(), stlsoft_char_traits::length_null(), and exception_string::operator+=().
Evaluates the length of the string s
, which may be null
.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::length().
Evaluates the length of the string s
up to a given number of characters.
s | The string to be evaluated. It may not be null | |
limit | The maximum number of characters to evaluate |
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::eq(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::length_max_null(), and stlsoft_char_traits::length_max_null().
Evaluates the length of the string s
, which may be null
, up to a given number of characters.
s | The string to be evaluated. It may be null | |
limit | The maximum number of characters to evaluate |
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::length_max().
Copies cch
characters from src
to dest
.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::assign(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::copy(), exception_string::exception_string(), and exception_string::operator+=().
Copies cch
characters from src
to dest
, accounting for whether the ranges overlap.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::assign(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::move().
static char_type const* find | ( | char_type const * | s, | |
size_type | cch, | |||
char_type const & | c | |||
) | [inline, static] |
Finds the first c
in cch
elements in s
, or NULL
if not found.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::eq(), and STLSOFT_MESSAGE_ASSERT.
Referenced by stlsoft_char_traits_safe::find().
Represents the character in
the character type char_type
.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits_safe::to_char_type().
Represents the character in
the integer type int_type
.
Reimplemented in stlsoft_char_traits_safe.
References ss_typename_type_k.
Referenced by stlsoft_char_traits_safe::to_int_type().
Evaluates whether lhs
and rhs
are equivalent.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits_safe::eq_int_type().
static int_type eof | ( | ) | [inline, static] |
Returns the value representing the end-of-file.
Reimplemented in stlsoft_char_traits_safe.
Referenced by stlsoft_char_traits_safe::eof(), and stlsoft_char_traits::not_eof().
Evaluates whether the given character is the end-of-file.
Reimplemented in stlsoft_char_traits_safe.
References stlsoft_char_traits::eof().
Referenced by stlsoft_char_traits_safe::not_eof().