Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(utf8_string_iterator), | intent(inout) | :: | this |
function iterator_get_next(this) result(cp)
class(utf8_string_iterator), intent(inout) :: this
!character(len=:, kind=c_char), pointer :: cp
character(len=:, kind=c_char), allocatable :: cp
integer :: n
n = codepoint_num_bytes(cast_byte(this%ptr(this%cur:this%cur)))
cp = this%ptr(this%cur:this%cur + n - 1)
this%cur = this%cur + n
end function iterator_get_next