MID$
Root / Documentation / [.]

Copy a substring out of a string.
Syntax
MID$ string$, startIndex% {, length% } OUT substring$
Input | Description |
---|---|
string$ | The string to copy from. |
startIndex% | The index in string$ to start copying from. |
length% | The number of characters to copy (optional.)
If omitted, copy characters up to the end of string$ . |
Output | Description |
substring$ | The substring copied from string$ . |
Examples
'copy the word "brown" PRINT MID$("The quick brown fox",10,5)
'copy the alphabet starting at N PRINT MID$("ABCDEFGHIJKLMNOPQRSTUVWXYZ",13)
No posts yet (will you be the first?)