Get Nth Line
- Updated2026-02-04
- 2 minute(s) read
Gets the characters that make up the Nth line in a string control and returns the offsets in the original string in bytes.
You can use this method to determine how the text in a string control is word-wrapped. The position indexes are byte indexes. These are usually equivalent to character indexes, except when using text that has characters that use multiple bytes, such as Asian character sets.
Parameters
| Name | Data type | Required | Description |
|---|---|---|---|
| line index | ![]() |
Yes | A number that indicates the line of text in the string control. Line numbers begin at zero. |
| line text | ![]() |
Yes | A substring of the original string indicated by index. |
| position of line start | ![]() |
Yes | The byte position in the original string where the substring begins. |
| position of line end | ![]() |
Yes | The byte position in the original string where the substring ends. |
Remarks
The following table lists the characteristics of this method.
| Short Name | Get Nth Line |
| Data type | No return value |
| Available in Run-Time Engine | Yes |
| Available in Real-Time Operating System | Yes |
| Settable when the VI is running | Yes |
| Loads the front panel into memory | Yes |
| Need to authenticate before use | No |
| Loads the block diagram into memory | No |
| Remote access allowed | Yes |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Graphics and Sound\2D Picture Control\Word Wrapping in Picture Control.vi


