index Interface

public interface index

Builtin index overloading.

Calls

interface~~index~~CallsGraph interface~index stringifor_string_t::index proc~sindex_character_string stringifor_string_t::sindex_character_string interface~index->proc~sindex_character_string proc~sindex_string_character stringifor_string_t::string%sindex_string_character interface~index->proc~sindex_string_character proc~sindex_string_string stringifor_string_t::string%sindex_string_string interface~index->proc~sindex_string_string

Contents


Module Procedures

private elemental function sindex_string_string(self, substring, back) result(i)

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.

Read more…

Arguments

Type IntentOptional 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.

Return Value integer

Result of the search.

private elemental function sindex_string_character(self, substring, back) result(i)

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.

Read more…

Arguments

Type IntentOptional 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.

Return Value integer

Result of the search.

private elemental function sindex_character_string(s, substring, back) result(i)

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.

Read more…

Arguments

Type IntentOptional 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.

Return Value integer

Result of the search.