Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fson_string), | pointer | :: | this | |||
type(fson_string), | pointer | :: | other |
logical function equals_string(this, other) result(equals)
type(fson_string), pointer :: this, other
integer :: i
equals = .false.
if (fson_string_length(this) /= fson_string_length(other)) then
equals = .false.
return
else if (fson_string_length(this) == 0) then
equals = .true.
return
end if
do i=1, fson_string_length(this)
if (get_char_at(this, i) /= get_char_at(other, i)) then
equals = .false.
return
end if
end do
equals = .true.
end function equals_string