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 after the prefix in str in there is a match
Returns:
non-zero if the prefix matches, zero otherwise

Definition at line 39 of file string.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 string.c.

Referenced by rtp_new_connection(), rtsp_read_header(), 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 string.c.

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 string.c.

Referenced by av_encode(), av_open_input_stream(), av_strlcat(), compute_real_filename(), compute_stats(), decode_info_header(), http_open(), http_open_cnx(), http_parse_request(), http_prepare_data(), id3v1_parse_tag(), img_read_header(), new_audio_stream(), new_subtitle_stream(), opt_output_file(), prepare_sdp_description(), rm_read_audio_stream_info(), rtp_new_connection(), rtsp_cmd_teardown(), rtsp_parse_request(), rtsp_send_cmd(), sdp_parse_line(), show_help_options(), start_children(), stream_open(), url_get_filename(), url_split(), and vorbis_comment().

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 after the prefix in str in there is a match
Returns:
non-zero if the prefix matches, zero otherwise

Definition at line 28 of file string.c.

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


Generated on Thu Apr 2 07:15:43 2009 for ffmpeg by  doxygen 1.5.6