04-16-2005 07:14 PM
04-17-2005 04:20 AM
04-18-2005 06:24 AM
03-02-2011 02:55 PM
You can use:
strncpy(STR_TARGET,STR_SOURCE,strlen(STR_SOURCE)-2);
The function strncpy delete the latest 2 bytes of STR_SOURCE
03-03-2011 02:05 AM
jjvema ha scritto:
You can use:
strncpy(STR_TARGET,STR_SOURCE,strlen(STR_SOURCE)-2);
The function strncpy delete the latest 2 bytes of STR_SOURCE
Take care when using strncpy as this command does not terminate the copied string: you should add STR_TARGET[strlen(STR_SOURCE)-2] = 0; or better use the toolbox function StrinCopyMax which has a series of advantages highlighted in the online help.