News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

IDEClearOutput and SelCStrLen

Started by TimoVJL, March 09, 2018, 02:32:27 PM

Previous topic - Next topic

TimoVJL

IDEClearOutput Add-In just clear poide Output window.

SelCStrLen Add-In display length of selected text to Output in two ways, first in chars, second in bytes.
Useful with const char string with escape chars, length counted using functionint CountCChars(TCHAR *pStr)
{
int len = 0;
while (*pStr) {
if (*pStr == '\"' || *pStr == '\n') {
pStr++;
continue;
}
if (*pStr == '\\')
pStr++;
len++;
pStr++;
}
return len;
}
May the source be with you