blob: 113702af59a9091a017aba7bb9a5a178c4e6d360 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstra715ec202025-07-09 22:18:31 +02002 int strrstr(string str, string str2)
3 int strrstr(string str, string str2, int pos)
4 int strrstr(bytes str, bytes str2)
5 int strrstr(bytes str, bytes str2, int pos)
MG Mud User88f12472016-06-24 23:31:02 +02006
Zesstra715ec202025-07-09 22:18:31 +02007DESCRIPTION
8 Returns the index of the first occurance of <str2> in <str> searching
9 from position <pos> (default: -1 == string end) on backward.
10 In other words: the index of the last occurance of <str2> before
11 the given position <pos>.
MG Mud User88f12472016-06-24 23:31:02 +020012
Zesstra715ec202025-07-09 22:18:31 +020013 The returned index is relativ to the beginning of the string.
MG Mud User88f12472016-06-24 23:31:02 +020014
Zesstra715ec202025-07-09 22:18:31 +020015 If <str2> is not found in <str>, -1 is returned.
MG Mud User88f12472016-06-24 23:31:02 +020016
Zesstra715ec202025-07-09 22:18:31 +020017 If <pos> is negativ, it designates the start position relative
18 to the end of the string (the search will still proceed towards
19 the beginning of the string).
MG Mud User88f12472016-06-24 23:31:02 +020020
Zesstra715ec202025-07-09 22:18:31 +020021HISTORY
22 Introduced in LDMud 3.2.10.
MG Mud User88f12472016-06-24 23:31:02 +020023
Zesstra715ec202025-07-09 22:18:31 +020024SEE ALSO
MG Mud User88f12472016-06-24 23:31:02 +020025 strstr(E), strlen(E), sscanf(E), sprintf(E), explode(E)