b64_decode_string_a Subroutine

private pure subroutine b64_decode_string_a(code, s)

Decode a base64 code into an array of strings.

 use befor64
 use penf
 character(5) :: array_s(1:2)
 call b64_decode(code='aGVsbG93b3JsZA==',s=array_s)
 print "(L1)", array_s(1)//array_s(2)=='helloworld'

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

character(len=*), intent(out) :: s(1:)

String to be decoded.

Calls

proc~~b64_decode_string_a~~CallsGraph proc~b64_decode_string_a b64_decode_string_a byte_size byte_size proc~b64_decode_string_a->byte_size proc~decode_bits decode_bits proc~b64_decode_string_a->proc~decode_bits
Help

Called By

proc~~b64_decode_string_a~~CalledByGraph proc~b64_decode_string_a b64_decode_string_a proc~b64_decode_up_a b64_decode_up_a proc~b64_decode_up_a->proc~b64_decode_string_a interface~b64_decode_up b64_decode_up interface~b64_decode_up->proc~b64_decode_up_a interface~b64_decode_up->proc~b64_decode_up_a interface~b64_decode_up->interface~b64_decode_up interface~b64_decode b64_decode interface~b64_decode->proc~b64_decode_string_a program~volatile_doctest~19 volatile_doctest program~volatile_doctest~19->interface~b64_decode program~volatile_doctest~29 volatile_doctest program~volatile_doctest~29->interface~b64_decode program~volatile_doctest~31 volatile_doctest program~volatile_doctest~31->interface~b64_decode program~volatile_doctest~24 volatile_doctest program~volatile_doctest~24->interface~b64_decode program~volatile_doctest~15 volatile_doctest program~volatile_doctest~15->interface~b64_decode program~volatile_doctest~21 volatile_doctest program~volatile_doctest~21->interface~b64_decode program~volatile_doctest~20 volatile_doctest program~volatile_doctest~20->interface~b64_decode program~volatile_doctest~28 volatile_doctest program~volatile_doctest~28->interface~b64_decode program~volatile_doctest~30 volatile_doctest program~volatile_doctest~30->interface~b64_decode program~volatile_doctest~17 volatile_doctest program~volatile_doctest~17->interface~b64_decode program~volatile_doctest~25 volatile_doctest program~volatile_doctest~25->interface~b64_decode program~volatile_doctest~16 volatile_doctest program~volatile_doctest~16->interface~b64_decode program~volatile_doctest~22 volatile_doctest program~volatile_doctest~22->interface~b64_decode program~volatile_doctest~18 volatile_doctest program~volatile_doctest~18->interface~b64_decode program~volatile_doctest~26 volatile_doctest program~volatile_doctest~26->interface~b64_decode program~volatile_doctest~27 volatile_doctest program~volatile_doctest~27->interface~b64_decode
Help

Source Code


Source Code

   pure subroutine b64_decode_string_a(code, s)
   !< Decode a base64 code into an array of strings.
   !<
   !<```fortran
   !< use befor64
   !< use penf
   !< character(5) :: array_s(1:2)
   !< call b64_decode(code='aGVsbG93b3JsZA==',s=array_s)
   !< print "(L1)", array_s(1)//array_s(2)=='helloworld'
   !<```
   !=> T <<<
   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)
   endsubroutine b64_decode_string_a