libavutil/avstring.h File Reference

#include <stddef.h>

Go to the source code of this file.

Functions

int av_strstart (const char *str, const char *pfx, const char **ptr)
 Return non-zero if pfx is a prefix of str.
int av_stristart (const char *str, const char *pfx, const char **ptr)
 Return non-zero if pfx is a prefix of str independent of case.
size_t av_strlcpy (char *dst, const char *src, size_t size)
 Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
size_t av_strlcat (char *dst, const char *src, size_t size)
 Append the string src to the string dst, but to a total length of no more than size - 1 bytes, and null-terminate dst.
size_t av_strlcatf (char *dst, size_t size, const char *fmt,...)
 Append output to a string, according to a format.


Function Documentation

int av_stristart ( const char *  str,
const char *  pfx,
const char **  ptr 
)

Return non-zero if pfx is a prefix of str independent of case.

If it is, *ptr is set to the address of the first character in str after the prefix.

Parameters:
str input string
pfx prefix to test
ptr updated if the prefix is matched inside str
Returns:
non-zero if the prefix matches, zero otherwise

Definition at line 39 of file avstring.c.

Referenced by rtsp_parse_line(), and rtsp_parse_range_npt().

size_t av_strlcat ( char *  dst,
const char *  src,
size_t  size 
)

Append the string src to the string dst, but to a total length of no more than size - 1 bytes, and null-terminate dst.

This function is similar to BSD strlcat(), but differs when size <= strlen(dst).

Parameters:
dst destination buffer
src source string
size size of destination buffer
Returns:
the total length of src and dst

Definition at line 60 of file avstring.c.

Referenced by avcodec_get_channel_layout_string(), avcodec_string(), make_setup_request(), matroska_convert_tag(), rtp_new_connection(), rtsp_read_header(), rtsp_read_packet(), rtsp_send_cmd(), rwpipe_open(), sdp_parse_line(), show_help_options(), and url_add_option().

size_t av_strlcatf ( char *  dst,
size_t  size,
const char *  fmt,
  ... 
)

Append output to a string, according to a format.

Never write out of the destination buffer, and and always put a terminating 0 within the buffer.

Parameters:
dst destination buffer (string to which the output is appended)
size total size of the destination buffer
fmt printf-compatible format string, specifying how the following parameters are used
Returns:
the length of the string that would have been generated if enough space had been available

Definition at line 68 of file avstring.c.

Referenced by ff_rdt_subscribe_rule(), make_setup_request(), and rtsp_read_packet().

size_t av_strlcpy ( char *  dst,
const char *  src,
size_t  size 
)

Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.

This function is the same as BSD strlcpy().

Parameters:
dst destination buffer
src source string
size size of destination buffer
Returns:
the length of src

Definition at line 50 of file avstring.c.

Referenced by av_open_input_stream(), av_strlcat(), avcodec_get_channel_layout_string(), compute_real_filename(), compute_status(), ff_metadata_demux_compat(), http_open(), http_open_cnx(), http_parse_request(), id3v2_read_ttag(), img_read_header(), matroska_convert_tag(), opt_output_file(), opt_preset(), rm_read_audio_stream_info(), rtp_new_connection(), rtsp_cmd_teardown(), rtsp_parse_line(), rtsp_parse_request(), rtsp_send_cmd(), sdp_parse_line(), show_help_options(), start_children(), stream_open(), url_get_filename(), and url_split().

int av_strstart ( const char *  str,
const char *  pfx,
const char **  ptr 
)

Return non-zero if pfx is a prefix of str.

If it is, *ptr is set to the address of the first character in str after the prefix.

Parameters:
str input string
pfx prefix to test
ptr updated if the prefix is matched inside str
Returns:
non-zero if the prefix matches, zero otherwise

Definition at line 28 of file avstring.c.

Referenced by ff_real_parse_sdp_a_line(), file_open(), http_open_cnx(), opt_output_file(), parse_h264_sdp_line(), pipe_open(), rdt_parse_sdp_line(), rtsp_probe(), sdp_parse_line(), and sdp_probe().


Generated on Fri Oct 26 02:35:46 2012 for FFmpeg by  doxygen 1.5.8