NumMatchStr
This function returns the number of pattern present inside the string.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION numMatchStr(chars, pattern) RESULT(Ans)
CHARACTER(*), INTENT(IN) :: chars
CHARACTER(*), INTENT(IN) :: pattern
INTEGER(I4B) :: ans
END FUNCTION numMatchStr
END INTERFACE
program main
use easifemBase
implicit none
CHARACTER( LEN = 100 ) :: astr = "hello, hello, hello world"
CALL OK( NumMatchStr(astr, "hello") .EQ. 3, "test(1): ")
end program main