NCopy
- Last UpdatedOct 29, 2026
- 1 minute read
Copies a defined section of a larger string.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
NCopy |
String |
Synchronous |
Yes |
Supported |
Supported |
Supported (see Notes below) |
Supported |
Supported |
Syntax
NCopy(strSource, numStartChar, numQtdChar)
strSource
The source string.
numStartChar
Integer tag containing a number corresponding to the first character being copied.
Note: The first character in the string is assigned the value 0.
numQtdChar
The number of characters to be copied (minimum of 1), starting from the specified starting position.
Note: If this value is not a positive integer, the function will return an empty string ("").
Returned value
Returns a string that is part of the source string (as defined by the function).
Notes
When this function is used in a project running on IoT View, it supports only single-byte Unicode characters (up to U+007F). Multi-byte Unicode characters are not supported at this time.
Examples
|
Tag Name |
Expression |
|---|---|
|
Tag |
NCopy("Studio version 7.0", 7, 7) // Returned value = "version" |
|
Tag |
NCopy("Technical Reference", 0, 9) // Returned value = "Technical" |