In C, assuming you are talking about zero terminated strings (the norm), \0
(i.e. the NUL
character, i.e. a zero) indicates a string has ended, not \n
.
You can search for two \n
using the strstr
function. From the man page:
#include <string.h>
char *strstr(const char *haystack, const char *needle);
So something like:
char *found;
found = strstr (string_to_search, "\n\n");