-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.ListPtr.Item
Andrew Lambert edited this page Nov 26, 2022
·
14 revisions
Function Item(Index As Integer) As String| Name | Type | Comment |
|---|---|---|
| Index | Integer | The index of the string to get. The first item is at Index 0
|
A copy of the string at Index.
If the list does not contain a string at Index (or the list is empty,) an OutOfBoundsException will be raised. If the next item in the list is invalid, a NilObjectException will be raised.
Each invocation traverses the list from 0 to Index. As such, the execution time to scan the entire list rises exponentially with the number of items. It is much, much faster to convert the list into a string array, and then use Xojo's built-in array manipulation methods to scan the list.
Dim lst As libcURL.ListPtr = Array("Hello", "world", "!")
For i As Integer = 0 To lst.Count - 1
MsgBox(lst.Item(i))
NextWiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.