Tor 0.4.9.3-alpha-dev
|
Header for smartlist_split.c. More...
Go to the source code of this file.
Macros | |
#define | SPLIT_SKIP_SPACE 0x01 |
#define | SPLIT_IGNORE_BLANK 0x02 |
#define | SPLIT_STRIP_SPACE 0x04 |
Functions | |
int | smartlist_split_string (smartlist_t *sl, const char *str, const char *sep, int flags, int max) |
Header for smartlist_split.c.
Definition in file smartlist_split.h.
#define SPLIT_IGNORE_BLANK 0x02 |
Definition at line 15 of file smartlist_split.h.
#define SPLIT_SKIP_SPACE 0x01 |
Definition at line 14 of file smartlist_split.h.
#define SPLIT_STRIP_SPACE 0x04 |
Definition at line 16 of file smartlist_split.h.
int smartlist_split_string | ( | smartlist_t * | sl, |
const char * | str, | ||
const char * | sep, | ||
int | flags, | ||
int | max | ||
) |
Split a string str along all occurrences of sep, appending the (newly allocated) split strings, in order, to sl. Return the number of strings added to sl.
If flags&SPLIT_SKIP_SPACE is true, remove initial and trailing space from each entry. If flags&SPLIT_IGNORE_BLANK is true, remove any entries of length 0. If flags&SPLIT_STRIP_SPACE is true, strip spaces from each split string.
If max>0, divide the string into no more than max pieces. If sep is NULL, split on any sequence of horizontal space.
Definition at line 37 of file smartlist_split.c.
Referenced by accounting_parse_options(), add_onion_helper_keyarg(), circuit_build_times_parse_state(), config_register_addressmaps(), consdiff_get_digests(), consensus_cache_entry_get_voter_id_digests(), control_cmd_parse_args(), decode_auth_type(), decode_create2_list(), decode_intro_points(), dir_split_resource_into_fingerprint_pairs(), dir_split_resource_into_fingerprints(), dirauth_options_validate(), dirserv_generate_networkstatus_vote_obj(), disk_state_parse_commits(), disk_state_parse_srv(), format_recommended_version_list(), get_bindaddr_from_transport_listen_line(), get_my_declared_family(), get_options_from_transport_options_line(), get_transport_in_state_by_name(), handle_control_add_onion(), handle_control_extendcircuit(), handle_control_onion_client_auth_add(), hs_parse_port_config(), metrics_parse_ports(), microdesc_parse_fields(), networkstatus_compute_consensus(), nodefamily_canonicalize(), normalize_nickname_list(), options_init_logs(), parse_accept_encoding_header(), parse_addr_policy(), parse_auth_file_content(), parse_authorized_client(), parse_bridge_line(), parse_dir_authority_line(), parse_dir_fallback_line(), parse_from_state_set_vals(), parse_http_response(), parse_log_severity_config(), parse_method_line_helper(), parse_or_diff_from_header(), parse_private_key_from_control_port(), parse_tcp_proxy_line(), port_parse_config(), pt_parse_transport_line(), rep_hist_load_mtbf_data(), routerset_parse(), state_transport_line_is_valid(), string_is_valid_nonrfc_hostname(), tor_inet_aton(), and tor_version_is_obsolete().