Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SU_STRLST_H
00026 #define SU_STRLST_H
00027
00035 #ifndef SU_ALLOC_H
00036 #include <sofia-sip/su_alloc.h>
00037 #endif
00038
00039 SOFIA_BEGIN_DECLS
00040
00041 typedef struct su_strlst_s su_strlst_t;
00042
00044 SU_DLL su_strlst_t *su_strlst_create(su_home_t *home)
00045 __attribute__((__malloc__));
00047 SU_DLL void su_strlst_destroy(su_strlst_t *);
00048
00049 SU_DLL su_strlst_t *su_strlst_create_with(su_home_t *, char const *, ...)
00050 __attribute__((__malloc__));
00051
00052 SU_DLL su_strlst_t *su_strlst_create_with_dup(su_home_t *, char const *, ...)
00053 __attribute__((__malloc__));
00054
00055 SU_DLL su_strlst_t *su_strlst_vcreate_with(su_home_t *,
00056 char const *,
00057 va_list va)
00058 __attribute__((__malloc__));
00059
00060 SU_DLL su_strlst_t *su_strlst_vcreate_with_dup(su_home_t *,
00061 char const *,
00062 va_list va)
00063 __attribute__((__malloc__));
00064
00066 SU_DLL su_strlst_t *su_strlst_copy(su_home_t *home, su_strlst_t const *orig);
00067
00069 SU_DLL su_strlst_t *su_strlst_dup(su_home_t *home, su_strlst_t const *orig);
00070
00072 SU_DLL char *su_strlst_dup_append(su_strlst_t *, char const *str);
00073
00075 SU_DLL char const *su_strlst_append(su_strlst_t *, char const *str);
00076
00078 SU_DLL char const *su_slprintf(su_strlst_t *self, char const *fmt, ...);
00079
00081 SU_DLL char const *su_slvprintf(su_strlst_t *self, char const *fmt, va_list ap);
00082
00084 SU_DLL char const *su_strlst_item(su_strlst_t const *, usize_t i);
00085
00087 SU_DLL char const *su_strlst_set_item(su_strlst_t *self, usize_t i,
00088 char const *s);
00089
00091 SU_DLL char const *su_strlst_remove(su_strlst_t *, usize_t i);
00092
00094 SU_DLL char *su_strlst_join(su_strlst_t *s, su_home_t *home,
00095 char const *sep)
00096 __attribute__((__malloc__));
00097
00099 SU_DLL su_strlst_t *su_strlst_split(su_home_t *, char *s, char const *sep)
00100 __attribute__((__malloc__));
00101
00103 SU_DLL su_strlst_t *su_strlst_dup_split(su_home_t *, char const *s,
00104 char const *sep)
00105 __attribute__((__malloc__));
00106
00108 SU_DLL usize_t su_strlst_len(su_strlst_t const *l);
00109
00110 #if SU_HAVE_INLINE
00111 su_inline
00112 su_home_t *su_strlst_home(su_strlst_t *s)
00113 {
00114 return (su_home_t *)s;
00115 }
00116 #else
00117 #define su_strlst_home(s) ((su_home_t *)(s))
00118 #endif
00119
00121 SU_DLL char const **su_strlst_get_array(su_strlst_t *self)
00122 __attribute__((__malloc__));
00123
00125 SU_DLL void su_strlst_free_array(su_strlst_t *self, char const * array[]);
00126
00127 SOFIA_END_DECLS
00128
00129 #endif