Skip to main content

IsPresent

Returns true if a substring pattern is found within string.

note

This routine does not handle trailing spaces that can be eliminated by TRIM(). So, strings should be trimmed when passing into function.

Interface​

INTERFACE
MODULE PURE FUNCTION isPresent(chars, pattern) RESULT(Ans)
CHARACTER(*), INTENT(IN) :: chars
CHARACTER(*), INTENT(IN) :: pattern
LOGICAL(LGT) :: ans
END FUNCTION isPresent
END INTERFACE