All pastes #103164 Raw Edit

Miscellany

public text v1 · immutable
#103164 ·published 2006-07-28 04:17 UTC
rendered paste body
char NewMsg[strlen(Input)];
    
    
    strcpy(NewMsg, Input);
    int start; 
    int end;
    char *pch;
    
    pch = strchr(NewMsg, '~');
    start = pch-NewMsg;
    printf("%d\n", start);
    
    pch = strchr(pch+1, ' ');
    end = pch-NewMsg;
    printf("%d\n", end);
    
    char Command[end-start];
    ZeroMemory(Command, sizeof(Command));

    strncpy(Command, &NewMsg[start], 17);
    Erase(Command, 0);
    printf("%s\n", Command); 
    
}