Builtin index overloading.
Return the position of the start of the first occurrence of string substring
as a substring in string
, counting from one.
If substring
is not present in string
, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self |
The string. |
||
type(string), | intent(in) | :: | substring |
Searched substring. |
||
logical, | intent(in), | optional | :: | back |
Start of the last occurrence rather than the first. |
Result of the search.
Return the position of the start of the first occurrence of string substring
as a substring in string
, counting from one.
If substring
is not present in string
, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self |
The string. |
||
character(kind=CK, len=*), | intent(in) | :: | substring |
Searched substring. |
||
logical, | intent(in), | optional | :: | back |
Start of the last occurrence rather than the first. |
Result of the search.
Return the position of the start of the first occurrence of string substring
as a substring in string
, counting from one.
If substring
is not present in string
, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK, len=*), | intent(in) | :: | s |
String. |
||
type(string), | intent(in) | :: | substring |
Searched substring. |
||
logical, | intent(in), | optional | :: | back |
Start of the last occurrence rather than the first. |
Result of the search.