4size_t GetLine(
const char *data,
bool strip)
16 CRLFPos = strstr(data,
"\r\n");
17 LFPos = strchr(data,
'\n');
19 if(CRLFPos == NULL && LFPos == NULL)
24 else if(CRLFPos == NULL || LFPos < CRLFPos)
26 if(strip) *LFPos =
'\0';
27 size_t ret = LFPos - data + 1;
34 if(strip) *CRLFPos =
'\0';
36 size_t ret = CRLFPos - data + 2;
size_t GetLine(const char *data, bool strip)