I have two strings which are defined thus:
char txt4[4], txt7[7];
The string txt7 holds the character representation of an integer (0 to 9999), via IntToStr, which is defined thus:
Converts input signed integer number to a string. The output string has fixed width of 7 characters including null character at the end (string termination). The output string is right justified and the remaining positions on the left (if any) are filled with blanks.Requires Destination string should be at least 7 characters in length.
The integers I'm converting have 4 digits and I want txt4 to hold these associated characters from txt7 (There is no sign character, and I'm not interested in the null terminator, the display routine is custom built).
What is a simple way to copy these 4 characters from txt7 to txt4?
char txt4[4], txt7[7];
The string txt7 holds the character representation of an integer (0 to 9999), via IntToStr, which is defined thus:
Converts input signed integer number to a string. The output string has fixed width of 7 characters including null character at the end (string termination). The output string is right justified and the remaining positions on the left (if any) are filled with blanks.Requires Destination string should be at least 7 characters in length.
The integers I'm converting have 4 digits and I want txt4 to hold these associated characters from txt7 (There is no sign character, and I'm not interested in the null terminator, the display routine is custom built).
What is a simple way to copy these 4 characters from txt7 to txt4?
Comment