Strmid
From SA-MP Wiki
Strmid
Extract a range of characters from a string.
(dest[],const source[],start,end,maxlength=sizeof dest)
| dest[] | The string to store the extracted characters in. |
| const source[] | The string from which to extract characters. |
| start | The position of the first character. |
| end | The position of the last character. |
| maxlength=sizeof dest(optional) | The length of the destination. |
This function does not return a specific value.
strmid(string, "Extract 'HELLO' without the !!!!: HELLO!!!!", 34, 39); //string contains "HELLO"
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
Any functions here can also be found on the Old scripting functions page.
- strcmp: Compare two strings to see if they are the same.
- strfind: Search for a substring in a string.
- strtok: Search for a variable typed after a space.
- strdel: Delete part/all of a string.
- strins: Put a string into another string.
- strlen: Check the length of a string.
- strpack: Pack a string into a destination.
- strval: Find the value of a string.
- strcat: Contact two strings into a destination reference.
