Split a string, given a token.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | s | |||
| character(len=*), | intent(in) | :: | token |
pure function split2(s,token) result(vals) implicit none type(string),intent(in) :: s character(len=*),intent(in) :: token type(string),dimension(:),allocatable:: vals if (allocated(s%str)) then vals = split1(s%str,token) else error stop 'error: string not allocated' end if end function split2