get_char_at Function

private recursive function get_char_at(this, i) result(c)

Arguments

Type IntentOptional AttributesName
type(fson_string), pointer:: this
integer, intent(in) :: i

Return Value character


Contents

Source Code


Source Code

  recursive character function get_char_at(this, i) result(c)
    type(fson_string), pointer :: this
    integer, intent(in) :: i

    if (i <= this % index) then
       c = this % chars(i:i)
    else
       c = get_char_at(this % next, i - this % index)
    end if

  end function get_char_at