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> | |
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> | |
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> | |
S | left (S const &s, size_t n) |
template<typename S> | |
S | right (S const &s, size_t n) |
template<typename S> | |
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 S1, typename S2, typename C> | |
ss_uint_t | split (S1 const &s, C delim, S2 &s0, S2 &s1, S2 &s2) |
Splits a string into three, at first two incidences of a delimiter. | |
template<typename S1, typename S2, typename C> | |
ss_uint_t | split (S1 const &s, C delim, S2 &s0, S2 &s1, S2 &s2, S2 &s3) |
Splits a string into four, at first three incidences of a delimiter. | |
template<typename S1, typename S2, typename C> | |
ss_uint_t | split (S1 const &s, C delim, S2 &s0, S2 &s1, S2 &s2, S2 &s3, S2 &s4) |
Splits a string into five, at first four incidences of a delimiter. | |
template<typename S1, typename S2, typename C> | |
ss_uint_t | split (S1 const &s, C delim, S2 &s0, S2 &s1, S2 &s2, S2 &s3, S2 &s4, S2 &s5) |
Splits a string into six, at first five incidences 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, exception_string::char_type const *rhs) |
Adds a C-style string to an exception_string. | |
exception_string | operator+ (exception_string::char_type lhs, exception_string const &rhs) |
Adds an exception_string to a character. | |
exception_string | operator+ (exception_string const &lhs, exception_string::char_type rhs) |
Adds a character to an exception_string. | |
exception_string | operator+ (exception_string::char_type 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. |
int comstl::bstr_compare | ( | BSTR | s1, | |
BSTR | s2 | |||
) | [inline] |
Compares two BSTR strings.
s1 | The first BSTR to compare. May be NULL | |
s2 | The second BSTR to compare. May be NULL |
<0 | s1 is lexicographically less than s2 | |
0 | s1 is lexicographically equal than s2 | |
>0 | s1 is lexicographically greater than s2 |
References comstl__bstr_compare().
BSTR comstl::bstr_create | ( | wchar_t const * | s, | |
size_t | len | |||
) | [inline] |
Creates a BSTR from a Unicode string.
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References comstl::bstr_create_w().
BSTR comstl::bstr_create | ( | wchar_t const * | s | ) | [inline] |
Creates a BSTR from a Unicode string.
s | The string from which to create the BSTR |
References comstl::bstr_create_w().
BSTR comstl::bstr_create | ( | char const * | s, | |
size_t | len | |||
) | [inline] |
Creates a BSTR from an ANSI string.
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References comstl::bstr_create_a().
BSTR comstl::bstr_create | ( | char const * | s | ) | [inline] |
Creates a BSTR from an ANSI string.
s | The string from which to create the BSTR |
References comstl::bstr_create_a().
BSTR comstl::bstr_create_a | ( | char const * | s, | |
size_t | len | |||
) | [inline] |
Creates a BSTR from an ANSI string.
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References comstl__bstr_create_len_a().
BSTR comstl::bstr_create_a | ( | char const * | s | ) | [inline] |
Creates a BSTR from an ANSI string.
s | The string from which to create the BSTR |
References comstl__bstr_create_a().
Referenced by comstl::bstr_create().
BSTR comstl::bstr_create_w | ( | wchar_t const * | s, | |
size_t | len | |||
) | [inline] |
Creates a BSTR from a Unicode string.
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References comstl__bstr_create_len_w().
BSTR comstl::bstr_create_w | ( | wchar_t const * | s | ) | [inline] |
Creates a BSTR from a Unicode string.
s | The string from which to create the BSTR |
References comstl__bstr_create_w().
Referenced by comstl::bstr_create().
void comstl::bstr_destroy | ( | BSTR | bstr | ) | [inline] |
BSTR comstl::bstr_dup | ( | BSTR | bstr | ) | [inline] |
Duplicates a BSTR.
bstr | The BSTR to duplicate |
References comstl__bstr_dup().
C const* stlsoft::c_str_data | ( | basic_simple_string< C, T, A > const & | s | ) | [inline] |
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
References stlsoft::c_str_data().
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
References stlsoft::c_str_data().
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.
References basic_simple_string::length().
size_t stlsoft::c_str_len_a | ( | basic_simple_string< char, T, A > const & | s | ) | [inline] |
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
References stlsoft::c_str_len().
C const* stlsoft::c_str_ptr | ( | basic_simple_string< C, T, A > const & | s | ) | [inline] |
char const* stlsoft::c_str_ptr_a | ( | basic_simple_string< char, T, A > const & | s | ) | [inline] |
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.
References basic_simple_string::c_str(), and basic_simple_string::length().
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
References stlsoft::c_str_ptr_null().
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
References stlsoft::c_str_ptr_null().
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
References stlsoft::c_str_ptr().
STLSOFT_INLINE int comstl__bstr_compare | ( | BSTR | s1, | |
BSTR | s2 | |||
) |
[C only] Compares two BSTR strings
s1 | The first BSTR to compare. May be NULL | |
s2 | The second BSTR to compare. May be NULL |
<0 | s1 is lexicographically less than s2 | |
0 | s1 is lexicographically equal than s2 | |
>0 | s1 is lexicographically greater than s2 |
References STLSOFT_NS_GLOBAL.
Referenced by comstl::bstr_compare(), and comstl__VARIANT_equal().
STLSOFT_INLINE BSTR comstl__bstr_create_a | ( | char const * | s | ) |
[C only] Creates a BSTR from an ANSI string
s | The string from which to create the BSTR |
References comstl__bstr_create_w(), STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl::bstr_create_a().
STLSOFT_INLINE BSTR comstl__bstr_create_len_a | ( | char const * | s, | |
size_t | len | |||
) |
[C only] Creates a BSTR from an ANSI string
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References comstl__bstr_create_len_w(), COMSTL_MESSAGE_ASSERT, STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl::bstr_create_a().
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
s | The string from which to create the BSTR | |
len | The number of characters of s to copy into the result |
References COMSTL_ASSERT, COMSTL_MESSAGE_ASSERT, STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl::bstr_create_w(), and comstl__bstr_create_len_a().
STLSOFT_INLINE BSTR comstl__bstr_create_w | ( | wchar_t const * | s | ) |
[C only] Creates a BSTR from a Unicode string
s | The string from which to create the BSTR |
References STLSOFT_NS_GLOBAL.
Referenced by comstl::bstr_create_w(), comstl__bstr_create_a(), and comstl__bstr_dup().
STLSOFT_INLINE void comstl__bstr_destroy | ( | BSTR | bstr | ) |
[C only] Destroys a BSTR
bstr | The BSTR to destroy |
References STLSOFT_NS_GLOBAL.
Referenced by comstl::bstr_destroy().
STLSOFT_INLINE BSTR comstl__bstr_dup | ( | BSTR | bstr | ) |
[C only] Duplicates a BSTR
bstr | The BSTR to duplicate |
References comstl__bstr_create_w().
Referenced by comstl::bstr_dup().
STLSOFT_INLINE LPOLESTR comstl__olestring_create_a | ( | char const * | s | ) |
[C only] Creates an OLE string from an ANSI string
s | The string from which to create the OLE string |
References STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl::olestring_create_a().
STLSOFT_INLINE LPOLESTR comstl__olestring_create_w | ( | wchar_t const * | s | ) |
[C only] Creates an OLE string from a Unicode string
s | The string from which to create the OLE string |
References STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl__olestring_dup(), and comstl::olestring_create_w().
STLSOFT_INLINE void comstl__olestring_destroy | ( | LPOLESTR | posz | ) |
[C only] Destroys an OLE string
posz | The OLE string to destroy |
References comstl__CoTaskMemDidAlloc(), COMSTL_MESSAGE_ASSERT, STLSOFT_NS_GLOBAL, and stlsoft_static_cast.
Referenced by comstl::olestring_destroy().
STLSOFT_INLINE LPOLESTR comstl__olestring_dup | ( | LPCOLESTR | posz | ) |
[C only] Duplicates an OLE string
posz | The OLE string to duplicate |
References comstl__olestring_create_w().
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.
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 . |
References STLSOFT_ASSERT.
Referenced by basic_file_path_buffer< C >::copy().
bool stlsoft::find_next_token | ( | C const *& | p0, | |
C const *& | p1, | |||
C | 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
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 |
NULL != p1
p0 <= p1
References STLSOFT_ASSERT.
C const* stlsoft::find_next_token | ( | C const *& | p0, | |
C const *& | p1, | |||
C const *const | end, | |||
C | 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
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 |
NULL != p1
NULL != end
p0 <= p1
p1 <= end
References STLSOFT_ASSERT.
S& stlsoft::make_lower | ( | S & | s | ) | [inline] |
Converts all characters in the string to lower case.
References ss_typename_type_k, and stlsoft::to_lower().
Referenced by stlsoft::to_lower().
S& stlsoft::make_upper | ( | S & | s | ) | [inline] |
Converts all characters in the string to upper case.
References ss_typename_type_k, and stlsoft::to_upper().
Referenced by stlsoft::to_upper().
LPOLESTR comstl::olestring_create | ( | wchar_t const * | s | ) | [inline] |
Creates an OLE string from a Unicode string.
s | The string from which to create the OLE string |
References comstl::olestring_create_w().
LPOLESTR comstl::olestring_create | ( | char const * | s | ) | [inline] |
Creates an OLE string from an ANSI string.
s | The string from which to create the OLE string |
References comstl::olestring_create_a().
Referenced by comstl::olestring_dup().
LPOLESTR comstl::olestring_create_a | ( | char const * | s | ) | [inline] |
Creates an OLE string from an ANSI string.
s | The string from which to create the OLE string |
References comstl__olestring_create_a().
Referenced by comstl::olestring_create().
LPOLESTR comstl::olestring_create_w | ( | wchar_t const * | s | ) | [inline] |
Creates an OLE string from a Unicode string.
s | The string from which to create the OLE string |
References comstl__olestring_create_w().
Referenced by comstl::olestring_create().
void comstl::olestring_destroy | ( | LPOLESTR | posz | ) | [inline] |
Destroys an OLE string.
posz | The OLE string to destroy |
References comstl__olestring_destroy().
Referenced by STATSTG_policy::clear(), and LPOLESTR_policy::clear().
LPOLESTR comstl::olestring_dup | ( | LPCOLESTR | posz | ) | [inline] |
Duplicates an OLE string.
posz | The OLE string to duplicate |
References comstl::olestring_create().
Referenced by STATSTG_policy::copy(), and LPOLESTR_policy::copy().
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+ | ( | exception_string::char_type const * | lhs, | |
exception_string const & | rhs | |||
) | [inline] |
Adds an exception_string to a C-style string.
exception_string stlsoft::operator+ | ( | exception_string const & | lhs, | |
exception_string::char_type | rhs | |||
) | [inline] |
Adds a character to an exception_string.
exception_string stlsoft::operator+ | ( | exception_string::char_type | lhs, | |
exception_string const & | rhs | |||
) | [inline] |
Adds an exception_string to a character.
exception_string stlsoft::operator+ | ( | exception_string const & | lhs, | |
exception_string::char_type const * | rhs | |||
) | [inline] |
Adds a C-style string to an exception_string.
static_array_1d<S, 2> stlsoft::split | ( | S const & | s, | |
C | delim | |||
) | [inline] |
Splits a string into two, at the first incidence of a delimiter.
References stlsoft::c_str_data(), and stlsoft::c_str_len().
ss_uint_t stlsoft::split | ( | S1 const & | s, | |
C | delim, | |||
S2 & | s0, | |||
S2 & | s1, | |||
S2 & | s2, | |||
S2 & | s3, | |||
S2 & | s4, | |||
S2 & | s5 | |||
) | [inline] |
Splits a string into six, at first five incidences of a delimiter.
The behaviour is undefined if the string instance being split is passed as one or both recipients
References stlsoft::c_str_data(), stlsoft::c_str_len(), and STLSOFT_MESSAGE_ASSERT.
ss_uint_t stlsoft::split | ( | S1 const & | s, | |
C | delim, | |||
S2 & | s0, | |||
S2 & | s1, | |||
S2 & | s2, | |||
S2 & | s3, | |||
S2 & | s4 | |||
) | [inline] |
Splits a string into five, at first four incidences of a delimiter.
The behaviour is undefined if the string instance being split is passed as one or both recipients
References stlsoft::c_str_data(), stlsoft::c_str_len(), and STLSOFT_MESSAGE_ASSERT.
ss_uint_t stlsoft::split | ( | S1 const & | s, | |
C | delim, | |||
S2 & | s0, | |||
S2 & | s1, | |||
S2 & | s2, | |||
S2 & | s3 | |||
) | [inline] |
Splits a string into four, at first three incidences of a delimiter.
The behaviour is undefined if the string instance being split is passed as one or both recipients
References stlsoft::c_str_data(), stlsoft::c_str_len(), and STLSOFT_MESSAGE_ASSERT.
ss_uint_t stlsoft::split | ( | S1 const & | s, | |
C | delim, | |||
S2 & | s0, | |||
S2 & | s1, | |||
S2 & | s2 | |||
) | [inline] |
Splits a string into three, at first two incidences of a delimiter.
The behaviour is undefined if the string instance being split is passed as one or both recipients
References stlsoft::c_str_data(), stlsoft::c_str_len(), and STLSOFT_MESSAGE_ASSERT.
bool stlsoft::split | ( | S1 const & | s, | |
C | 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
References stlsoft::c_str_data(), stlsoft::c_str_len(), and STLSOFT_MESSAGE_ASSERT.
C* stlsoft::string_dup | ( | C const * | str, | |
A & | ator, | |||
size_t * | psize = NULL | |||
) | [inline] |
Allocates a copy of the string, using the given allocator.
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. |
References stlsoft::c_str_len(), and stlsoft::string_dup().
C* stlsoft::string_dup | ( | C const * | str, | |
size_t | cch, | |||
A & | ator | |||
) | [inline] |
Allocates a copy of the string, using the given allocator.
str | The string to copy | |
cch | The number of elements in str to copy | |
ator | The allocator to use to allocate the memory |
References ss_template_qual_k, ss_typename_type_k, and STLSOFT_SUPPRESS_UNUSED.
Referenced by stlsoft::string_dup().
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.
References stlsoft::make_lower().
Referenced by stlsoft::make_lower().
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.
References stlsoft::make_upper().
Referenced by stlsoft::make_upper().
S& stlsoft::trim_all | ( | S & | str | ) | [inline] |
Trims all the leading and trailing whitespace characters, if any, from a string.
References ss_typename_type_k, and STLSOFT_SUPPRESS_UNUSED.
S& stlsoft::trim_left | ( | S & | str | ) | [inline] |
Trims all the leading whitespace characters, if any, from a string.
References ss_typename_type_k, and STLSOFT_SUPPRESS_UNUSED.
S& stlsoft::trim_right | ( | S & | str | ) | [inline] |
Trims all the trailing whitespace characters, if any, from a string.
References ss_typename_type_k, and STLSOFT_SUPPRESS_UNUSED.