NumStrings
This function returns the number of substrings inside a string which are separate by one or more spaces.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION numStrings(chars) RESULT(Ans)
CHARACTER(*), INTENT(IN) :: chars
INTEGER(I4B) :: ans
END FUNCTION numStrings
END INTERFACE
program main
use easifemBase
implicit none
character( LEN = 100 ) :: astr="Hello world how are you!"
call OK(NumStrings(astr) .EQ. 5_I4B, "test(1): " )
end program main