char *substr(char *s, int from, int to)
{
    char *p= s= s + from;
    while (to--)
        ++s;
    *s= '\0';
    return p;
}