comparison src/util.h @ 6982:083d1e4a9c78

[gaim-migrate @ 7538] This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He rewrote the coreish IM image support so that the binary data gets ripped out in the prpl and put in an imgstore instead of just being passed in the same huge as char string as the actual message. This is good because it's prpl agnostic, or something. It also means we don't have a silly length of "-1" with pretty much every send or receive IM function. It should be crash free, bug free, and memleak free, but additional testing is always a good thing. If you like good stuff then you'll love this patch. But don't take my word for it--ba dun dunt! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 19:17:21 +0000
parents 4ae5d9c3d9ec
children 2343c3aa1dec
comparison
equal deleted inserted replaced
6981:abd3c684da31 6982:083d1e4a9c78
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