Home / Open source / Terimber 2.0
str_template Namespace Referencestring utilities
More...
|
Functions |
template<class T> |
size_t | strlen (const T *x) |
| template function for string length calculation
|
template<class T> |
T * | strcpy (T *dest, const T *x, size_t len=os_minus_one) |
| template function for string coping
|
template<class T> |
int | strcmp (const T *dest, const T *x, size_t len=os_minus_one) |
| template function for string comparision
|
int | strnocasecmp (const char *dest, const char *x, size_t len) |
| template function for string comparision without case narrow string
|
int | strnocasecmp (const wchar_t *dest, const wchar_t *x, size_t len) |
| template function for string comparision without case wide string
|
const char * | strformat (char *buf, const char *format) |
| converts narrow string format to itself
|
const wchar_t * | strformat (wchar_t *buf, const char *format) |
| converts narrow string format to wide format string
|
int | strscan (const char *buf, size_t len, const char *format, void *res) |
| scans only one parameter narrow char
|
int | strscan (const wchar_t *buf, size_t len, const wchar_t *format, void *res) |
| scans only one parameter wide char
|
int | strprint (char *buf, size_t len, const char *format,...) |
| prints to memory formatted string narrow string
|
int | strprint (wchar_t *buf, size_t len, const wchar_t *format,...) |
| prints to memory formatted string wide string
|
size_t | multibyte_to_unicode_len (const char *x, size_t len=os_minus_one) |
| gets the length required for utf-8 to utf-16 conversion
|
size_t | unicode_to_multibyte_len (const wchar_t *x, size_t len=os_minus_one) |
| gets the length required for utf-16 to utf-8 conversion
|
const wchar_t * | multibyte_to_unicode (wchar_t *dest, size_t dest_len, const char *x, size_t src_len=os_minus_one) |
| converts utf-8 to utf-16 using pre-allocated buffer
|
const wchar_t * | multibyte_to_unicode (wstring_t &dest, const char *x, size_t len=os_minus_one) |
| converts utf-8 to utf-16 using wstring_t class
|
const wchar_t * | multibyte_to_unicode (byte_allocator &_allocator, const char *x, size_t len=os_minus_one) |
| converts utf-8 to utf-16 using external allocator
|
const char * | unicode_to_multibyte (char *dest, size_t dest_len, const wchar_t *x, size_t src_len=os_minus_one) |
| converts utf-16 to utf-8 using pre-allocated buffer
|
const char * | unicode_to_multibyte (string_t &dest, const wchar_t *x, size_t len=os_minus_one) |
| converts utf-16 to utf-8 using string_t class
|
const char * | unicode_to_multibyte (byte_allocator &_allocator, const wchar_t *x, size_t len=os_minus_one) |
| converts utf-16 to utf-8 using external allocator
|
Detailed Description
string utilities
Function Documentation
const wchar_t * str_template::multibyte_to_unicode |
( |
wchar_t * |
dest, |
|
|
size_t |
dest_len, |
|
|
const char * |
x, |
|
|
size_t |
src_len = os_minus_one | |
|
) |
| | [inline] |
size_t str_template::multibyte_to_unicode_len |
( |
const char * |
x, |
|
|
size_t |
len = os_minus_one | |
|
) |
| | [inline] |
gets the length required for utf-8 to utf-16 conversion
- Parameters:
-
x |
input string |
len |
string length |
Definition at line 530 of file string.hpp.
Referenced by multibyte_to_unicode().
template<class T>
int str_template::strcmp |
( |
const T * |
dest, |
|
|
const T * |
x, |
|
|
size_t |
len = os_minus_one | |
|
) |
| | [inline] |
template function for string comparision
- Parameters:
-
dest |
first string |
x |
second string |
len |
number chars to compare |
Definition at line 492 of file string.hpp.
Referenced by base_string< T >::_compare(), _fullpath(), xml_document::assign_attribute_value(), compare_value(), daemon::daemon_main(), odbc_dbserver::get_odbc_error(), msg_communicator::init(), operator_less(), msg_communicator::parse_connection(), msg_communicator::parse_listener(), parse_value(), dtd_processor::parseAttDef(), byte_source::parseStandalone(), and var_object_repository::process_condition().
template<class T>
T * str_template::strcpy |
( |
T * |
dest, |
|
|
const T * |
x, |
|
|
size_t |
len = os_minus_one | |
|
) |
| | [inline] |
template function for string coping
- Parameters:
-
dest |
destrination buffer |
x |
input string |
len |
string length |
Definition at line 479 of file string.hpp.
Referenced by date::date(), msg_rpc_global::init(), parse_value(), aiosock::resolve_sock_error_code(), binder::set_as_string(), binder::set_as_wstring(), orcl_dbserver::v_bind_one_param(), odbc_dbserver::v_bind_one_param(), mysql_dbserver::v_bind_one_param(), orcl_dbserver::v_replace_quote(), odbc_dbserver::v_replace_quote(), and mysql_dbserver::v_replace_quote().
const wchar_t * str_template::strformat |
( |
wchar_t * |
buf, |
|
|
const char * |
format | |
|
) |
| | [inline] |
converts narrow string format to wide format string
- Parameters:
-
buf |
[out] buffer |
format |
input format |
Definition at line 397 of file string.hpp.
const char * str_template::strformat |
( |
char * |
buf, |
|
|
const char * |
format | |
|
) |
| | [inline] |
template<class T>
size_t str_template::strlen |
( |
const T * |
x |
) |
[inline] |
template function for string length calculation
- Parameters:
-
Definition at line 466 of file string.hpp.
Referenced by base_string< T >::_add(), base_string< T >::_compare(), _fullpath(), fuzzy_matcher_impl::_match(), fuzzy_matcher_impl::add(), aiomsg::add_connection(), aiomsg::add_listener(), variant_factory::clone(), binder::clone(), msg_rpc_connection::connect(), copy_db_row(), copy_string(), xml_stream_attribute::crack_xml_request(), daemon::daemon_main(), date::date(), do_hash(), daemon::find_full_path(), hex_to_binary(), msg_rpc_global::init(), msg_communicator::init(), msg_pack::make_error_msg(), fuzzy_wrapper_impl::match(), multibyte_to_unicode(), numeric::numeric(), stream_input_common::open(), msg_communicator::parse_connection(), mysql_dbserver::parse_connection_string(), msg_communicator::parse_listener(), parse_value(), main_map_key::partial_match(), varmap< T, C >::offset_map_key::partial_match(), var_object_repository::process_error(), var_object_repository::process_query(), vardatabase::process_xml_request(), byte_consumer::push(), ServerPostBlock(), binder::set_as_string(), binder::set_as_wstring(), strnocasecmp(), byte_source::throw_exception(), orcl_dbserver::v_bind_one_param(), odbc_dbserver::v_bind_one_param(), mysql_dbserver::v_bind_one_param(), orcl_dbserver::v_connect(), odbc_dbserver::v_convert_one_value(), mysql_dbserver::v_convert_one_value(), odbc_dbserver::v_rebind_one_param(), and mysql_dbserver::v_rebind_one_param().
int str_template::strnocasecmp |
( |
const wchar_t * |
dest, |
|
|
const wchar_t * |
x, |
|
|
size_t |
len | |
|
) |
| | [inline] |
int str_template::strnocasecmp |
( |
const char * |
dest, |
|
|
const char * |
x, |
|
|
size_t |
len | |
|
) |
| | [inline] |
template function for string comparision without case narrow string
- Parameters:
-
dest |
first string |
x |
second string |
len |
number chars to compare |
Definition at line 501 of file string.hpp.
References os_minus_one, and strlen().
Referenced by xml_document::add_pi(), byte_source::checkEncodingSchema(), compare_value(), xml_stream_attribute::crack_xml_request(), tokenizer::do_abbr(), main_map_key::operator<(), varmap< T, C >::offset_map_key::operator<(), word_key::operator<(), byte_manager::parsePI(), byte_source::parseVersion(), main_map_key::partial_match(), varmap< T, C >::offset_map_key::partial_match(), var_object_repository::process_returns(), and var_object_repository::process_values().
int str_template::strprint |
( |
wchar_t * |
buf, |
|
|
size_t |
len, |
|
|
const wchar_t * |
format, |
|
|
|
... | |
|
) |
| | [inline] |
prints to memory formatted string wide string
- Parameters:
-
buf |
[out] buffer |
len |
buffer length |
format |
format string |
Definition at line 445 of file string.hpp.
int str_template::strprint |
( |
char * |
buf, |
|
|
size_t |
len, |
|
|
const char * |
format, |
|
|
|
... | |
|
) |
| | [inline] |
prints to memory formatted string narrow string
- Parameters:
-
buf |
[out] buffer |
len |
buffer length |
format |
format string |
Definition at line 428 of file string.hpp.
Referenced by memtable::add_index(), cluster_processor< T, N >::cut(), daemon::daemon_main(), date::get_date(), date::get_date_only(), numeric::numeric(), persist_value(), mst< T, N >::pfs(), xml_stream_attribute::prepare_http_request(), xml_stream_attribute::prepare_socket_request(), var_object_repository::process_query(), xmlconfig::set(), byte_source::throw_exception(), uustring(), and orcl_dbserver::v_form_sql_string().
int str_template::strscan |
( |
const wchar_t * |
buf, |
|
|
size_t |
len, |
|
|
const wchar_t * |
format, |
|
|
void * |
res | |
|
) |
| | [inline] |
scans only one parameter wide char
- Parameters:
-
buf |
scan buffer |
len |
buffer length |
format |
format string |
res |
pointer to argument memory |
Definition at line 417 of file string.hpp.
int str_template::strscan |
( |
const char * |
buf, |
|
|
size_t |
len, |
|
|
const char * |
format, |
|
|
void * |
res | |
|
) |
| | [inline] |
const char * str_template::unicode_to_multibyte |
( |
char * |
dest, |
|
|
size_t |
dest_len, |
|
|
const wchar_t * |
x, |
|
|
size_t |
src_len = os_minus_one | |
|
) |
| | [inline] |
size_t str_template::unicode_to_multibyte_len |
( |
const wchar_t * |
x, |
|
|
size_t |
len = os_minus_one | |
|
) |
| | [inline] |
gets the length required for utf-16 to utf-8 conversion
- Parameters:
-
x |
input string |
len |
string length |
Definition at line 717 of file string.hpp.
Referenced by unicode_to_multibyte().
|
|