functionin_setpureprivate
pure logical function in_set(set, key)
True if key is one of the blank-separated words of set, which starts and ends with a blank.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| set | character(len=*) | in | the words | |
| key | character(len=*) | in | the word to find |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| in_set | logical |
Source
Show the code
pure logical function in_set(set, key)
character(len=*), intent(in) :: set !! the words
character(len=*), intent(in) :: key !! the word to find
in_set = index(set, ' '//key//' ') > 0
end function in_set