MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 2 | int strstr(string str, string str2) |
| 3 | int strstr(string str, string str2, int pos) |
| 4 | int strstr(bytes str, bytes str2) |
| 5 | int strstr(bytes str, bytes str2, int pos) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 6 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 7 | DESCRIPTION |
| 8 | Returns the index of <str2> in <str> searching from position <pos> |
| 9 | on forward. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 10 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 11 | The returned index is relativ to the beginning of the string. |
| 12 | If <str2> is not found in <str>, -1 is returned. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 13 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 14 | If <pos> is negativ, it designates the start position relative |
| 15 | to the end of the string (the search will still proceed towards |
| 16 | the end of the string). |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 19 | strrstr(E), strlen(E), sscanf(E), sprintf(E), explode(E) |