scan Interface

public interface scan

Scans the string for any of the characters in the specified substring.


Contents


Module Procedures

private pure elemental function string_scan_string(str, substr, back) result(rst)

Scans the string for any of the characters in the specified substring.

Arguments

Type IntentOptional Attributes Name
type(string), intent(in) :: str

The string to search.

type(string), intent(in) :: substr

The string for which to search.

logical, intent(in), optional :: back

leftmost character; else, if true, the rightmost position is returned.

Return Value integer(kind=int32)

The index of either the leftmost or rightmost character.

private pure elemental function string_scan_char(str, substr, back) result(rst)

Scans the string for any of the characters in the specified substring.

Arguments

Type IntentOptional Attributes Name
type(string), intent(in) :: str

The string to search.

character(len=*), intent(in) :: substr

The string for which to search.

logical, intent(in), optional :: back

leftmost character; else, if true, the rightmost position is returned.

Return Value integer(kind=int32)

The index of either the leftmost or rightmost character.

private pure elemental function char_scan_string(str, substr, back) result(rst)

Scans the string for any of the characters in the specified substring.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

The string to search.

type(string), intent(in) :: substr

The string for which to search.

logical, intent(in), optional :: back

leftmost character; else, if true, the rightmost position is returned.

Return Value integer(kind=int32)

The index of either the leftmost or rightmost character.