![Advantech UbiQ User Manual Download Page 88](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809088.webp)
UbiQ Scenario Manager User Manual
82
5.2.30
strcpy
Syntax
int strcpy(char* pDest, char* pSour, int nStart, int nLen) or
int strcpy(char* pDest, string sSour, int nStart, int nLen)
Parameters
pDest: Specifies the Destination array
pSour: Specifies the NULL ended character array.
sSour: Specified the source string
nStart: the begin position to be copied, is the 0-based index
nLen: the length from source string to destination array
Description
This function return the actually length from source string to destination array.
Example
// The example will show the pChar and f1 in the debug window
char pDest[20]; // declare pDest as char[20]
char pSour[20]; // declare pSour as char[20]
string aStr; // declare aStr as string
aStr=”0123456789”;
pSour=”abcdefghijk”;
setdebug(TRUE);
strcpy(pDest,pSour,5,4);
debug(“strcpy(pDest,”,pSour,”,5,4)=”,pDest); // It will show “strcpy(pDest,abc-
defghijk,5,4)=fghi
strcpy(pDest,aStr,3,5);
debug(“strcpy(pDest,”,pSour,”,3,5)=”,pDest); // It will show
“(0123456789,3,5)=34567
See Also
strlen
Summary of Contents for UbiQ
Page 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Page 4: ...UbiQ Scenario Manager User Manual iv...
Page 7: ...Chapter 1 1 Introduction...
Page 13: ...Chapter 2 2 Getting Started...
Page 37: ...Chapter 3 3 Tutorials...
Page 47: ...Chapter 4 4 Basic of Smart C Script Language...
Page 62: ...UbiQ Scenario Manager User Manual 56...