这两天作Pro*C,以前对C不了解,接触了一点,留点备份。
static char* substr(const char*str,
unsigned start, unsigned end)
{
unsigned n = end - start;
static char stbuf[256];
strncpy(stbuf, str + start, n);
stbuf[n] = 0;
return stbuf;
}
BOOL IsStrDigit(char *pszString)
{
if (pszString == NULL) return FALSE;
while (*pszString != '\0') {
if (!isdigit(*pszString ++)) return FALSE;
}
return TRUE;
}