Decode a base64 code into an array of strings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
| character(len=*), | intent(out) | :: | s(1:) | String to be decoded. |
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.
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.
pure subroutine b64_decode_string_a(code, s)
!---------------------------------------------------------------------------------------------------------------------------------
!< Decode a base64 code into an array of strings.
!---------------------------------------------------------------------------------------------------------------------------------
character(*), intent(in) :: code !< Encoded scalar.
character(*), intent(out) :: s(1:) !< String to be decoded.
integer(I1P), allocatable :: nI1P(:) !< One byte integer array containing n.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
allocate(nI1P(1:byte_size(s(1))*size(s,dim=1))) ; nI1P = 0_I1P
call decode_bits(code=code,bits=nI1P)
s = transfer(nI1P,s)
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine b64_decode_string_a