Shift each char in the *str from last char to the current position to the one right position(move the '\0' first untill the current postion)
Hope you can get inspiration from this segment:
int i; int lcstrPos; //Cursor Position in the string int strLength; strLength = strlen(str); lcstrPos = *curPosition + *strOffset; for(i=strLength+1;i>lcstrPos;str[i--]=str[strLength--]); str[lcstrPos] = key;
Please leave your comment if any problems.
No comments:
Post a Comment