Return the character sequence represented by the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| integer, | intent(in) | :: | start | |||
| integer, | intent(in) | :: | last |
pure function char_string_range(string, start, last) result(character_string) type(string_type), intent(in) :: string integer, intent(in) :: start integer, intent(in) :: last character(len=last - start + 1) :: character_string ! See len_trim_string. Assignment to a character variable blank-pads on ! the right, so the unallocated case needs no `repeat`. if (allocated(string%raw)) then character_string = string%raw(int(start, long):int(last, long)) else character_string = "" end if end function char_string_range