StrLeft
- Last UpdatedOct 29, 2026
- 1 minute read
Copies the first characters of a larger string.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
StrLeft |
String |
Synchronous |
Yes |
Supported |
Supported |
Supported (see Notes below) |
Supported |
Supported |
Syntax
StrLeft(strSource, numQtdChar)
strSource
The source string.
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 containing the left-most characters in the source string.
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 |
StrLeft("Studio version 7.0", 8) // Returned value = Studio v |
|
Tag |
StrLeft ("Technical Reference", 9) // Returned value = Technical |