Changeset 47ab9a9 for lib/misc.c
- Timestamp:
- 2015-11-27T23:42:00Z (8 years ago)
- Branches:
- master
- Children:
- 31d9930
- Parents:
- d088ee8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/misc.c
rd088ee8 r47ab9a9 771 771 } 772 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.