нужен аналог для string.h в скоторый есть в phpтакой$rest = substr("abcdef", 1); и такой$rest = substr("abcdef",0, 1);
char* subString (const char* input, int offset, int len, char* dest){ int input_len = strlen (input); if (offset + len > input_len) { return NULL; } strncpy (dest, input + offset, len); return dest;}char dest[80];const char* source = "hello world";if (subString (source, 0, 5, dest)){ printf ("%s\n", dest);}
if (offset + len > input_len) { return NULL; }
strncpy (dest, input + offset, len); return dest;}
char dest[80];const char* source = "hello world";
if (subString (source, 0, 5, dest)){ printf ("%s\n", dest);}
Благодарю