Decode a string from the "JSON Pointer" RFC 6901 format.
It replaces ~1
with /
and ~0
with ~
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
pure function decode_rfc6901(str) result(str_out)
implicit none
character(kind=CK,len=*),intent(in) :: str
character(kind=CK,len=:),allocatable :: str_out
str_out = str
call replace_string(str_out,tilde//CK_'1',slash)
call replace_string(str_out,tilde//CK_'0',tilde)
end function decode_rfc6901