String Library
[Libraries]


Detailed Description

Created: 6th June 2006 Updated: 14th January 2007.

This library defines strings that extend the STL.

The strings provided by the STLSoft libraries include:


Classes

class  ccombstr_veneer
 Applies standard string (std::basic_string) interface to the CComBSTR class. More...
class  c_string_accessor
 Template providing scoped C-string access to a String. More...
class  grab_cstring_buffer
 Scopes the aquisition and release of a CString buffer. More...
class  resource_string
 Instances of this class represent Windows string resources, and are constructed from instance identifiers. More...
struct  char_alt_traits
 Traits for determining the alternate character type. More...
struct  stlsoft_char_traits
 Character traits. More...
struct  stlsoft_char_traits_safe
 Character traits, all of the operations of which can work with null pointers. More...
struct  char_traits
 Character traits, all of the operations of which can work with null pointers. More...
struct  char_traits_safe
 Character traits, all of the operations of which can work with null pointers. More...
struct  charset_comparator
 Comparator for the stlsoft::charset_tokeniser class template. More...
class  charset_tokeniser
 A class template that provides string tokenising behaviour, where the delimiter is a character set, a la strtok(). More...
struct  cstring_maker
 Utility class that creates/destroys fixed-size C-strings for other classes. More...
class  fsc_seed
 This is used as a seed when namespace issues make the selection of the fast_string_concatenator overloads of operator +() ambiguous. More...
class  fast_string_concatenator
 Expression template class which provides fast string concatenation. More...
struct  quoter
 Unary function class that returns a quoted form of its argument, if the argument contains spaces. More...
class  basic_shim_string
 An implementation class, which provides efficient intermediate string objects for conversion shims. More...
class  basic_simple_string
 Simple string class. More...
class  special_string_instance_0
 Special string instance class template. More...
class  special_string_instance_1
 Special string instance class template. More...
class  basic_static_string
 Simple string class using fixed-size static-based storage. More...
struct  string_tokeniser_ignore_blanks
 A tokenising policy for specifying whether blanks will be included or ignored (now deprecated; replaced by skip_blank_tokens). More...
struct  skip_blank_tokens
 A tokenising policy for specifying whether blanks will be included or ignored. More...
struct  string_tokeniser_type_traits
 A traits class for detecting features of the string type and the value type used to specialise string_tokeniser. More...
struct  string_tokeniser_comparator
 A generic comparator, used to specialise string_tokeniser, that covers most string and delimiter types. More...
class  string_tokeniser
 A class template that provides string tokenising behaviour. More...
struct  string_traits
 Traits for determining the characteristics of strings. More...
class  basic_string_view
 A string class that holds no internal storage, and merely represents a window into other string storage. More...
class  exception_string
 Minimalist string class for use within exception classes. More...
class  basic_resource_string
 Instances of this class represent Windows string resources, and are constructed from instance identifiers. More...

Functions

STLSOFT_INLINE BSTR comstl__bstr_create_w (wchar_t const *s)
 [C only] Creates a BSTR from a Unicode string
STLSOFT_INLINE BSTR comstl__bstr_create_len_w (wchar_t const *s, size_t len)
 [C only] Creates a BSTR from a (part of a) Unicode string
STLSOFT_INLINE BSTR comstl__bstr_create_a (char const *s)
 [C only] Creates a BSTR from an ANSI string
STLSOFT_INLINE BSTR comstl__bstr_create_len_a (char const *s, size_t len)
 [C only] Creates a BSTR from an ANSI string
STLSOFT_INLINE void comstl__bstr_destroy (BSTR bstr)
 [C only] Destroys a BSTR
STLSOFT_INLINE BSTR comstl__bstr_dup (BSTR bstr)
 [C only] Duplicates a BSTR
STLSOFT_INLINE int comstl__bstr_compare (BSTR s1, BSTR s2)
 [C only] Compares two BSTR strings
BSTR bstr_create_w (wchar_t const *s)
 Creates a BSTR from a Unicode string.
BSTR bstr_create_w (wchar_t const *s, size_t len)
 Creates a BSTR from a Unicode string.
BSTR bstr_create_a (char const *s)
 Creates a BSTR from an ANSI string.
BSTR bstr_create_a (char const *s, size_t len)
 Creates a BSTR from an ANSI string.
BSTR bstr_create (char const *s)
 Creates a BSTR from an ANSI string.
BSTR bstr_create (char const *s, size_t len)
 Creates a BSTR from an ANSI string.
BSTR bstr_create (wchar_t const *s)
 Creates a BSTR from a Unicode string.
BSTR bstr_create (wchar_t const *s, size_t len)
 Creates a BSTR from a Unicode string.
void bstr_destroy (BSTR bstr)
 Destroys a BSTR.
BSTR bstr_dup (BSTR bstr)
 Duplicates a BSTR.
int bstr_compare (BSTR s1, BSTR s2)
 Compares two BSTR strings.
STLSOFT_INLINE LPOLESTR comstl__olestring_create_a (char const *s)
 [C only] Creates an OLE string from an ANSI string
STLSOFT_INLINE LPOLESTR comstl__olestring_create_w (wchar_t const *s)
 [C only] Creates an OLE string from a Unicode string
STLSOFT_INLINE void comstl__olestring_destroy (LPOLESTR posz)
 [C only] Destroys an OLE string
STLSOFT_INLINE LPOLESTR comstl__olestring_dup (LPCOLESTR posz)
 [C only] Duplicates an OLE string
LPOLESTR olestring_create_a (char const *s)
 Creates an OLE string from an ANSI string.
LPOLESTR olestring_create_w (wchar_t const *s)
 Creates an OLE string from a Unicode string.
LPOLESTR olestring_create (char const *s)
 Creates an OLE string from an ANSI string.
LPOLESTR olestring_create (wchar_t const *s)
 Creates an OLE string from a Unicode string.
void olestring_destroy (LPOLESTR posz)
 Destroys an OLE string.
LPOLESTR olestring_dup (LPCOLESTR posz)
 Duplicates an OLE string.
template<typename S>
S & make_upper (S &s)
 Converts all characters in the string to upper case.
template<typename S>
S & make_lower (S &s)
 Converts all characters in the string to lower case.
template<typename S>
to_upper (S const &s)
 Returns a copy of the source string in which all characters have been converted to upper case.
template<typename S>
to_lower (S const &s)
 Returns a copy of the source string in which all characters have been converted to lower case.
template<typename S>
left (S const &s, size_t n)
template<typename S>
right (S const &s, size_t n)
template<typename S>
mid (S const &s, size_t pos, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
left (char const *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
left (char *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
left (wchar_t const *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
left (wchar_t *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
right (char const *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
right (char *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
right (wchar_t const *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
right (wchar_t *s, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
mid (char const *s, size_t pos, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< char > 
mid (char *s, size_t pos, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
mid (wchar_t const *s, size_t pos, size_t n)
_STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE
< wchar_t > 
mid (wchar_t *s, size_t pos, size_t n)
template<typename C>
size_t copy_contents (C *dest, size_t cchDest, C const *src, size_t cchSource)
 Utility function for copying C-string contents into a caller supplied buffer, which may be NULL to measure the required extent.
template<typename C, typename A>
C * string_dup (C const *str, size_t cch, A &ator)
 Allocates a copy of the string, using the given allocator.
template<typename C, typename A>
C * string_dup (C const *str, A &ator, size_t *psize=NULL)
 Allocates a copy of the string, using the given allocator.
template<typename C, typename T, typename A>
C const * c_str_ptr_null (basic_simple_string< C, T, A > const &s)
 Returns the corresponding C-string pointer of s, or a null pointer.
template<typename T, typename A>
char const * c_str_ptr_null_a (basic_simple_string< char, T, A > const &s)
 char variant of c_str_ptr_null for basic_simple_string specialisations
template<typename T, typename A>
wchar_t const * c_str_ptr_null_w (basic_simple_string< wchar_t, T, A > const &s)
 wchar_t variant of c_str_ptr_null for basic_simple_string specialisations
template<typename C, typename T, typename A>
C const * c_str_ptr (basic_simple_string< C, T, A > const &s)
 Returns the corresponding C-string pointer of s.
template<typename T, typename A>
char const * c_str_ptr_a (basic_simple_string< char, T, A > const &s)
 char variant of c_str_ptr for basic_simple_string specialisations
template<typename T, typename A>
wchar_t const * c_str_ptr_w (basic_simple_string< wchar_t, T, A > const &s)
 wchar_t variant of c_str_ptr for basic_simple_string specialisations
template<typename C, typename T, typename A>
C const * c_str_data (basic_simple_string< C, T, A > const &s)
 Returns the corresponding C-string pointer of s.
template<typename T, typename A>
char const * c_str_data_a (basic_simple_string< char, T, A > const &s)
 char variant of c_str_data for basic_simple_string specialisations
template<typename T, typename A>
wchar_t const * c_str_data_w (basic_simple_string< wchar_t, T, A > const &s)
 wchar_t variant of c_str_data for basic_simple_string specialisations
template<typename C, typename T, typename A>
size_t c_str_len (basic_simple_string< C, T, A > const &s)
 Returns the length (in characters) of s, not including the null-terminating character.
template<typename T, typename A>
size_t c_str_len_a (basic_simple_string< char, T, A > const &s)
 char variant of c_str_len for basic_simple_string specialisations
template<typename T, typename A>
size_t c_str_len_w (basic_simple_string< wchar_t, T, A > const &s)
 wchar_t variant of c_str_len for basic_simple_string specialisations
template<typename S1, typename S2, typename C>
bool split (S1 const &s, C delim, S2 &s0, S2 &s1)
 Splits a string into two, at the first incidence of a delimiter.
template<typename S, typename C>
static_array_1d< S, 2 > split (S const &s, C delim)
 Splits a string into two, at the first incidence of a delimiter.
template<typename C>
C const * find_next_token (C const *&p0, C const *&p1, C const *const end, C delim)
 Adjusts the delimiters into a token string to find the next token, according to the given delimiter.
template<typename C>
bool find_next_token (C const *&p0, C const *&p1, C delim)
 Adjusts the delimiters into a token string to find the next token, according to the given delimiter.
template<typename S>
S & trim_left (S &str)
 Trims all the leading whitespace characters, if any, from a string.
template<typename S0, typename S1>
S0 & trim_left (S0 &str, S1 const &trimChars)
template<typename S>
S & trim_right (S &str)
 Trims all the trailing whitespace characters, if any, from a string.
template<typename S0, typename S1>
S0 & trim_right (S0 &str, S1 const &trimChars)
template<typename S>
S & trim_all (S &str)
 Trims all the leading and trailing whitespace characters, if any, from a string.
template<typename S0, typename S1>
S0 & trim_all (S0 &str, S1 const &trimChars)
template<typename S>
S & remove_all (S &str)
template<typename S0, typename S1>
S0 & remove_all (S0 &str, S1 const &removeChars)
basic_string_view< char > left_view (char const *s, size_t n)
basic_string_view< wchar_t > left_view (wchar_t const *s, size_t n)
basic_string_view< char > right_view (char const *s, size_t n)
basic_string_view< wchar_t > right_view (wchar_t const *s, size_t n)
basic_string_view< char > mid_view (char const *s, size_t start, size_t n)
basic_string_view< wchar_t > mid_view (wchar_t const *s, size_t start, size_t n)
exception_string operator+ (exception_string const &lhs, char const *rhs)
 Adds a C-style string to an exception_string.
exception_string operator+ (char lhs, exception_string const &rhs)
 Adds an exception_string to a character.
exception_string operator+ (exception_string const &lhs, char rhs)
 Adds a character to an exception_string.
exception_string operator+ (char const *lhs, exception_string const &rhs)
 Adds an exception_string to a C-style string.
exception_string operator+ (exception_string const &lhs, exception_string const &rhs)
 Adds an exception_string to an exception_string.


Function Documentation

int comstl::bstr_compare ( BSTR  s1,
BSTR  s2 
) [inline]

Compares two BSTR strings.

Parameters:
s1 The first BSTR to compare. May be NULL
s2 The second BSTR to compare. May be NULL
Returns:
An integer value representing the relationship between the strings
Return values:
<0 s1 is lexicographically less than s2
0 s1 is lexicographically equal than s2
>0 s1 is lexicographically greater than s2

BSTR comstl::bstr_create ( wchar_t const *  s,
size_t  len 
) [inline]

Creates a BSTR from a Unicode string.

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

BSTR comstl::bstr_create ( wchar_t const *  s  )  [inline]

Creates a BSTR from a Unicode string.

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

BSTR comstl::bstr_create ( char const *  s,
size_t  len 
) [inline]

Creates a BSTR from an ANSI string.

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

BSTR comstl::bstr_create ( char const *  s  )  [inline]

Creates a BSTR from an ANSI string.

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

BSTR comstl::bstr_create_a ( char const *  s,
size_t  len 
) [inline]

Creates a BSTR from an ANSI string.

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

BSTR comstl::bstr_create_a ( char const *  s  )  [inline]

Creates a BSTR from an ANSI string.

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

BSTR comstl::bstr_create_w ( wchar_t const *  s,
size_t  len 
) [inline]

Creates a BSTR from a Unicode string.

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

BSTR comstl::bstr_create_w ( wchar_t const *  s  )  [inline]

Creates a BSTR from a Unicode string.

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

void comstl::bstr_destroy ( BSTR  bstr  )  [inline]

Destroys a BSTR.

Parameters:
bstr The BSTR to destroy

BSTR comstl::bstr_dup ( BSTR  bstr  )  [inline]

Duplicates a BSTR.

Parameters:
bstr The BSTR to duplicate
Returns:
The copied BSTR

C const* stlsoft::c_str_data ( basic_simple_string< C, T, A > const &  s  )  [inline]

Returns the corresponding C-string pointer of s.

char const* stlsoft::c_str_data_a ( basic_simple_string< char, T, A > const &  s  )  [inline]

char variant of c_str_data for basic_simple_string specialisations

wchar_t const* stlsoft::c_str_data_w ( basic_simple_string< wchar_t, T, A > const &  s  )  [inline]

wchar_t variant of c_str_data for basic_simple_string specialisations

size_t stlsoft::c_str_len ( basic_simple_string< C, T, A > const &  s  )  [inline]

Returns the length (in characters) of s, not including the null-terminating character.

size_t stlsoft::c_str_len_a ( basic_simple_string< char, T, A > const &  s  )  [inline]

char variant of c_str_len for basic_simple_string specialisations

size_t stlsoft::c_str_len_w ( basic_simple_string< wchar_t, T, A > const &  s  )  [inline]

wchar_t variant of c_str_len for basic_simple_string specialisations

C const* stlsoft::c_str_ptr ( basic_simple_string< C, T, A > const &  s  )  [inline]

Returns the corresponding C-string pointer of s.

char const* stlsoft::c_str_ptr_a ( basic_simple_string< char, T, A > const &  s  )  [inline]

char variant of c_str_ptr for basic_simple_string specialisations

C const* stlsoft::c_str_ptr_null ( basic_simple_string< C, T, A > const &  s  )  [inline]

Returns the corresponding C-string pointer of s, or a null pointer.

char const* stlsoft::c_str_ptr_null_a ( basic_simple_string< char, T, A > const &  s  )  [inline]

char variant of c_str_ptr_null for basic_simple_string specialisations

wchar_t const* stlsoft::c_str_ptr_null_w ( basic_simple_string< wchar_t, T, A > const &  s  )  [inline]

wchar_t variant of c_str_ptr_null for basic_simple_string specialisations

wchar_t const* stlsoft::c_str_ptr_w ( basic_simple_string< wchar_t, T, A > const &  s  )  [inline]

wchar_t variant of c_str_ptr for basic_simple_string specialisations

STLSOFT_INLINE int comstl__bstr_compare ( BSTR  s1,
BSTR  s2 
)

[C only] Compares two BSTR strings

Parameters:
s1 The first BSTR to compare. May be NULL
s2 The second BSTR to compare. May be NULL
Returns:
An integer value representing the relationship between the strings
Return values:
<0 s1 is lexicographically less than s2
0 s1 is lexicographically equal than s2
>0 s1 is lexicographically greater than s2

STLSOFT_INLINE BSTR comstl__bstr_create_a ( char const *  s  ) 

[C only] Creates a BSTR from an ANSI string

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

STLSOFT_INLINE BSTR comstl__bstr_create_len_a ( char const *  s,
size_t  len 
)

[C only] Creates a BSTR from an ANSI string

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

STLSOFT_INLINE BSTR comstl__bstr_create_len_w ( wchar_t const *  s,
size_t  len 
)

[C only] Creates a BSTR from a (part of a) Unicode string

Parameters:
s The string from which to create the BSTR
len The number of characters of s to copy into the result
Returns:
The created BSTR

STLSOFT_INLINE BSTR comstl__bstr_create_w ( wchar_t const *  s  ) 

[C only] Creates a BSTR from a Unicode string

Parameters:
s The string from which to create the BSTR
Returns:
The created BSTR

STLSOFT_INLINE void comstl__bstr_destroy ( BSTR  bstr  ) 

[C only] Destroys a BSTR

Parameters:
bstr The BSTR to destroy

STLSOFT_INLINE BSTR comstl__bstr_dup ( BSTR  bstr  ) 

[C only] Duplicates a BSTR

Parameters:
bstr The BSTR to duplicate
Returns:
The copied BSTR

STLSOFT_INLINE LPOLESTR comstl__olestring_create_a ( char const *  s  ) 

[C only] Creates an OLE string from an ANSI string

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

STLSOFT_INLINE LPOLESTR comstl__olestring_create_w ( wchar_t const *  s  ) 

[C only] Creates an OLE string from a Unicode string

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

STLSOFT_INLINE void comstl__olestring_destroy ( LPOLESTR  posz  ) 

[C only] Destroys an OLE string

Parameters:
posz The OLE string to destroy

STLSOFT_INLINE LPOLESTR comstl__olestring_dup ( LPCOLESTR  posz  ) 

[C only] Duplicates an OLE string

Parameters:
posz The OLE string to duplicate
Returns:
The copied OLE string

size_t stlsoft::copy_contents ( C *  dest,
size_t  cchDest,
C const *  src,
size_t  cchSource 
) [inline]

Utility function for copying C-string contents into a caller supplied buffer, which may be NULL to measure the required extent.

Parameters:
dest Pointer to a character buffer that will receive the contents. May be NULL, in which case the function returns cchSource.
cchDest The maximum number of characters to be written into dest.
src Pointer to character buffer whose contents will be copied into dest. May not be NULL.
cchSource The number of characters in src.

bool stlsoft::find_next_token ( C const *&  p0,
C const *&  p1,
delim 
) [inline]

Adjusts the delimiters into a token string to find the next token, according to the given delimiter.

Processing stops when p1 points to the nul-terminating character

Parameters:
p0 Pointer to the current token in the string. Will be set to the next when the function returns
p1 Pointer to the current token in the string. Will be set to the end of the token when the function returns
delim The delimiter
Returns:
p0
Precondition:
NULL != p0

NULL != p1

p0 <= p1

C const* stlsoft::find_next_token ( C const *&  p0,
C const *&  p1,
C const *const   end,
delim 
) [inline]

Adjusts the delimiters into a token string to find the next token, according to the given delimiter.

Processing stops when p1 is equal to end

Parameters:
p0 Pointer to the current token in the string. Will be set to the next when the function returns
p1 Pointer to the current token in the string. Will be set to the end of the token when the function returns
end The end of the string
delim The delimiter
Returns:
p0
Precondition:
NULL != p0

NULL != p1

NULL != end

p0 <= p1

p1 <= end

S& stlsoft::make_lower ( S &  s  )  [inline]

Converts all characters in the string to lower case.

S& stlsoft::make_upper ( S &  s  )  [inline]

Converts all characters in the string to upper case.

LPOLESTR comstl::olestring_create ( wchar_t const *  s  )  [inline]

Creates an OLE string from a Unicode string.

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

LPOLESTR comstl::olestring_create ( char const *  s  )  [inline]

Creates an OLE string from an ANSI string.

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

LPOLESTR comstl::olestring_create_a ( char const *  s  )  [inline]

Creates an OLE string from an ANSI string.

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

LPOLESTR comstl::olestring_create_w ( wchar_t const *  s  )  [inline]

Creates an OLE string from a Unicode string.

Parameters:
s The string from which to create the OLE string
Returns:
The created OLE string

void comstl::olestring_destroy ( LPOLESTR  posz  )  [inline]

Destroys an OLE string.

Parameters:
posz The OLE string to destroy

LPOLESTR comstl::olestring_dup ( LPCOLESTR  posz  )  [inline]

Duplicates an OLE string.

Parameters:
posz The OLE string to duplicate
Returns:
The copied OLE string

exception_string stlsoft::operator+ ( exception_string const &  lhs,
exception_string const &  rhs 
) [inline]

Adds an exception_string to an exception_string.

exception_string stlsoft::operator+ ( char const *  lhs,
exception_string const &  rhs 
) [inline]

Adds an exception_string to a C-style string.

exception_string stlsoft::operator+ ( exception_string const &  lhs,
char  rhs 
) [inline]

Adds a character to an exception_string.

exception_string stlsoft::operator+ ( char  lhs,
exception_string const &  rhs 
) [inline]

Adds an exception_string to a character.

exception_string stlsoft::operator+ ( exception_string const &  lhs,
char const *  rhs 
) [inline]

Adds a C-style string to an exception_string.

static_array_1d<S, 2> stlsoft::split ( S const &  s,
delim 
) [inline]

Splits a string into two, at the first incidence of a delimiter.

bool stlsoft::split ( S1 const &  s,
delim,
S2 &  s0,
S2 &  s1 
) [inline]

Splits a string into two, at the first incidence of a delimiter.

The behaviour is undefined if the string instance being split is passed as one or both recipients

C* stlsoft::string_dup ( C const *  str,
A &  ator,
size_t *  psize = NULL 
) [inline]

Allocates a copy of the string, using the given allocator.

Parameters:
str The string to copy
ator The allocator to use to allocate the memory
psize Pointer to receive the size of the allocated string. May be NULL.
Note:
The caller is responsible for the allocated memory, and should free it with ator (or a compatible allocator or memory function).

C* stlsoft::string_dup ( C const *  str,
size_t  cch,
A &  ator 
) [inline]

Allocates a copy of the string, using the given allocator.

Parameters:
str The string to copy
cch The number of elements in str to copy
ator The allocator to use to allocate the memory
Note:
The caller is responsible for the allocated memory, and should free it with ator (or a compatible allocator or memory function).

S stlsoft::to_lower ( S const &  s  )  [inline]

Returns a copy of the source string in which all characters have been converted to lower case.

S stlsoft::to_upper ( S const &  s  )  [inline]

Returns a copy of the source string in which all characters have been converted to upper case.

S& stlsoft::trim_all ( S &  str  )  [inline]

Trims all the leading and trailing whitespace characters, if any, from a string.

S& stlsoft::trim_left ( S &  str  )  [inline]

Trims all the leading whitespace characters, if any, from a string.

S& stlsoft::trim_right ( S &  str  )  [inline]

Trims all the trailing whitespace characters, if any, from a string.


Generated on Sat May 23 20:50:33 2009 for STLSoft by  doxygen 1.5.4