utilities for string handling More...
#include <jabberdlib.h>Functions | |
| char * | j_strdup (const char *str) |
| char * | j_strcat (char *dest, char *txt) |
| int | j_strcmp (const char *a, const char *b) |
| int | j_strcasecmp (const char *a, const char *b) |
| int | j_strncmp (const char *a, const char *b, int i) |
| int | j_strncasecmp (const char *a, const char *b, int i) |
| int | j_strlen (const char *a) |
| int | j_atoi (const char *a, int def) |
| char * | strunescape (pool p, char *buf) |
| std::string | strescape (std::string s) |
| char * | strescape (pool p, char *buf) |
| char * | zonestr (char const *file, int line) |
utilities for string handling
This file contains utility functions for string handling:
String spools allow to create a string by concatenating several smaller strings and the spool implementation is allocating the neccessary memory using memory pools.
| int j_atoi | ( | const char * | a, | |
| int | def | |||
| ) |
| int j_strcasecmp | ( | const char * | a, | |
| const char * | b | |||
| ) |
NULL pointer save version of strcasecmp()
If one of the parameters contains a NULL pointer, the string is considered to be unequal
| a | the one string | |
| b | the other string |
Referenced by dialback_in_read_db(), dialback_out_read(), and xmlnode_select_by_lang().
| char* j_strcat | ( | char * | dest, | |
| char * | txt | |||
| ) |
NULL pointer save version of strcat()
| dest | where to append the string | |
| txt | what to append |
| int j_strcmp | ( | const char * | a, | |
| const char * | b | |||
| ) |
NULL pointer save version of strcmp
If one of the parameters contains a NULL pointer, the string is considered to be unequal.
| a | the one string | |
| b | the other string |
Referenced by _js_routed_packet(), _js_routed_session_control_packet(), _xdb_convert_hostspool(), acl_get_users(), deliver_fail(), dialback_check_settings(), dialback_in_read(), dialback_in_read_db(), dialback_in_verify(), dialback_out_packet(), dialback_out_read(), dialback_out_read_db(), dialback_packets(), dnsrv(), dnsrv_deliver(), expat_startElement(), xmppd::instance_base::get_instance_config(), jlimit_check(), jpacket_subtype(), js_bounce_xmpp(), js_sc_session_new(), js_session_end(), js_session_get(), js_session_new(), jsm(), jutil_regkey(), log_get_facility(), log_get_level(), main(), mio_ssl_init(), mod_dynamic(), mod_log(), mod_presence(), pthsock_client(), xdb_file_load(), xdb_file_phandler(), xdb_sql(), xmlnode_get_attrib(), xmlnode_get_tag(), xmlnode_get_tags(), xmlnode_insert_tag_ns(), xmlnode_new_tag_pool(), xmlnode_new_tag_pool_ns(), xmlnode_put_attrib(), xmlnode_put_attrib_ns(), xmlnode_put_expat_attribs(), and xstream_parse_error().
| char* j_strdup | ( | const char * | str | ) |
NULL pointer save version of strdup()
| str | the string the should be duplicated |
| int j_strlen | ( | const char * | a | ) |
NULL pointer save version of strlen
If the parameter contains a NULL pointer, 0 is returned
| a | the string for which the length should be calculated |
Referenced by dialback_in_read_db(), js_session_get(), jutil_msgnew(), jutil_presnew(), log_generic(), logger(), main(), srv_lookup(), xdb_file_phandler(), and xmlnode2file_limited().
| int j_strncasecmp | ( | const char * | a, | |
| const char * | b, | |||
| int | i | |||
| ) |
NULL pointer save version of strncasecmp()
If one of the parameters contains a NULL pointer, the string is considered to be unequal
| a | the first string | |
| b | the second string | |
| i | how many characters to compare at most |
| int j_strncmp | ( | const char * | a, | |
| const char * | b, | |||
| int | i | |||
| ) |
NULL pointer save version of strncmp()
If one of the parameters contains a NULL pointer, the string is considered to be unequal
| a | the first string | |
| b | the second string | |
| i | how many characters to compare at most |
Referenced by dialback_check_settings(), js_session_get(), xmlnode_get_attrib(), xmlnode_hide_attrib(), and xmlnode_put_attrib().
| char* strescape | ( | pool | p, | |
| char * | buf | |||
| ) |
References pmalloc().
Referenced by xstream_header_char().
| std::string strescape | ( | std::string | s | ) |
escape a string to be print as XML
| s | the original string |
| char* zonestr | ( | char const * | file, | |
| int | line | |||
| ) |
1.6.1