projects
/
ccan
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
str: change example to match function being explained.
[ccan]
/
ccan
/
str
/
str.h
diff --git
a/ccan/str/str.h
b/ccan/str/str.h
index 770a40fd1f4dca3fe599cfdee109fe9fa581b861..bf858f13b69cb1f671a895450004f36a6ad361cd 100644
(file)
--- a/
ccan/str/str.h
+++ b/
ccan/str/str.h
@@
-62,8
+62,10
@@
static inline bool strends(const char *str, const char *postfix)
* @needle: a substring
*
* Example:
* @needle: a substring
*
* Example:
- * #define PRINT_COND_IF_FALSE(cond) \
- * ((cond) || printf("%s is false!", stringify(cond)))
+ * int i;
+ * i = strcount("aaa aaa", "a"); // i = 6;
+ * i = strcount("aaa aaa", "ab"); // i = 0;
+ * i = strcount("aaa aaa", "aa"); // i = 2;
*/
size_t strcount(const char *haystack, const char *needle);
*/
size_t strcount(const char *haystack, const char *needle);