scan Interface

public interface scan

Scan a string for the presence of a set of characters. Scans a string for any of the characters in a set of characters.

If back is either absent or false, this function returns the position of the leftmost character of string that is in set. If back is true, the rightmost position is returned. If no character of set is found in string, the result is zero.

This method is elemental and returns a default integer scalar value.


Contents


Module Procedures

private elemental function scan_object_object(string, set, back) result(pos)

Scan a character sequence for any of the characters in a set of characters.

Arguments

Type IntentOptional AttributesName
class(string_class), intent(in) :: string
class(string_class), intent(in) :: set
logical, intent(in), optional :: back

Return Value integer

private elemental function scan_object_string(string, set, back) result(pos)

Scan a character sequence for any of the characters in a set of characters.

Arguments

Type IntentOptional AttributesName
class(string_class), intent(in) :: string
type(string_type), intent(in) :: set
logical, intent(in), optional :: back

Return Value integer

private elemental function scan_object_char(string, set, back) result(pos)

Scan a character sequence for any of the characters in a set of characters.

Arguments

Type IntentOptional AttributesName
class(string_class), intent(in) :: string
character(len=*), intent(in) :: set
logical, intent(in), optional :: back

Return Value integer

private elemental function scan_string_object(string, set, back) result(pos)

Scan a character sequence for any of the characters in a set of characters.

Arguments

Type IntentOptional AttributesName
type(string_type), intent(in) :: string
class(string_class), intent(in) :: set
logical, intent(in), optional :: back

Return Value integer

private elemental function scan_char_object(string, set, back) result(pos)

Scan a character sequence for any of the characters in a set of characters.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: string
class(string_class), intent(in) :: set
logical, intent(in), optional :: back

Return Value integer