OP> In all of my googling when learning how to work with C
OP> commands I found that you can use strncpy like substring
No one's saying you can't. It's just that if you only do this strncpy( dest, src + start, length);
and it actually copies length characters (as it often will when being used as a substr function) it will not automaticlly put a null character at the end to properly terminate the string. You must do that yourself, like so: dest[length] = 0;