Changes in lib/misc.c [73f0a01:47ab9a9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/misc.c
r73f0a01 r47ab9a9 187 187 } else if (g_strncasecmp(cs + 1, "br", taglen) == 0) { 188 188 *(s++) = '\n'; 189 } else if (g_strncasecmp(cs + 1, "br/", taglen) == 0) { 190 *(s++) = '\n'; 191 } else if (g_strncasecmp(cs + 1, "br /", taglen) == 0) { 192 *(s++) = '\n'; 189 193 } 190 194 in++; … … 295 299 296 300 /* Warning: This one explodes the string. Worst-cases can make the string 3x its original size! */ 297 /* This fu ction is safe, but make sure you call it safely as well! */301 /* This function is safe, but make sure you call it safely as well! */ 298 302 void http_encode(char *s) 299 303 { … … 767 771 } 768 772 773 /* Filters all the characters in 'blacklist' replacing them with 'replacement'. 774 * Modifies the string in-place and returns the string itself. 775 * For the opposite, use g_strcanon() */ 776 char *str_reject_chars(char *string, const char *reject, char replacement) 777 { 778 char *c = string; 779 780 while (*c) { 781 c += strcspn(c, reject); 782 if (*c) { 783 *c = replacement; 784 } 785 } 786 787 return string; 788 }
Note: See TracChangeset
for help on using the changeset viewer.