fdoc

functionlast_separatorpure

pure integer function last_separator(path)

The position of the last separator in path, / or \, or 0.

Arguments

NameTypeIntentAttributesDescription
pathcharacter(len=*)in

the path

Result

NameTypeAttributesDescription
last_separatorinteger

Source

Show the code
pure integer function last_separator(path)
    character(len=*), intent(in) :: path    !! the path

    last_separator = max(index(path, '/', back=.true.), index(path, '\', back=.true.))
end function last_separator

Graphs

Called by