src/util.h

changeset 6982
12f08de92674
parent 6861
4210d7406062
child 7094
8f9588491993
equal deleted inserted replaced
6981:749f11b02abf 6982:12f08de92674
312 */ 312 */
313 gchar *gaim_strreplace(const gchar *string, const gchar *delimiter, 313 gchar *gaim_strreplace(const gchar *string, const gchar *delimiter,
314 const gchar *replacement); 314 const gchar *replacement);
315 315
316 /** 316 /**
317 * This is like strstr, except that it ignores ASCII case in
318 * searching for the substring.
319 *
320 * @param haystack The string to search in.
321 * @param needle The substring to find.
322 * @return the location of the substring if found, or NULL if not
323 */
324 const char *gaim_strcasestr(const char *haystack, const char *needle);
325
326 /**
317 * Returns a string representing a filesize in the appropriate 327 * Returns a string representing a filesize in the appropriate
318 * units (MB, KB, GB, etc.) 328 * units (MB, KB, GB, etc.)
319 * 329 *
320 * @param size The size 330 * @param size The size
321 */ 331 */
322 char *gaim_get_size_string(size_t size); 332 char *gaim_get_size_string(size_t size);
333
334 /**
335 * Finds a HTML tag matching the given name, locating its start
336 * and end, and storing its attributes in a GData hash table.
337 * The names of the attributes are lower-cased in the hash table,
338 * and the name of the tag is case insensitive.
339 *
340 * @param needle the name of the tag
341 * @param haystack the null-delimited string to search in
342 * @param start a pointer to the start of the tag if found
343 * @param end a pointer to the end of the tag if found
344 * @param attributes the attributes, if the tag was found
345 * @return TRUE if the tag was found
346 */
347 gboolean gaim_markup_find_tag(const char *needle, const char *haystack, const char **start, const char **end, GData **attributes);
323 348
324 #ifdef __cplusplus 349 #ifdef __cplusplus
325 } 350 }
326 #endif 351 #endif
327 352

mercurial