#include "project.h" ICACHE_FLASH_ATTR char * bounded_strstr (char *haystack, uint32_t len, char *needle) { char *end = haystack + len; char *hptr, *nptr; if (!*needle) return NULL; for (; (*haystack) && (haystack < end); ++haystack) { hptr = haystack; nptr = needle; while ((*hptr) == (*nptr)) { nptr++; hptr++; if (!*nptr) return haystack; if (hptr >= end) return NULL; } } return NULL; } bool util_isspace (char c) { switch (c) { case ' ': case '\r': case '\t': case '\n': return true; default: return false; } } ICACHE_FLASH_ATTR void crash (void) { char *c = NULL; os_printf ("%d", *c); }