! C の sprintf(3) とは大分違うので注意。
!

function DCStringCPrintf(fmt, i, r, d, L, s, n, c1, c2, c3) result(result)
    use dcstring_base, only: VSTRING
    use dc_types, only: string
    use dc_string, only: DCStringSPrintf
    implicit none
    character(len = string):: result
    character(*), intent(in):: fmt
    integer, intent(in), optional:: i(:), n(:)
    real, intent(in), optional:: r(:)
    double precision, intent(in), optional:: d(:)
    logical, intent(in), optional:: L(:)
    type(VSTRING), intent(in), optional:: s(:)
    character(*), intent(in), optional:: c1, c2, c3
continue
    call dcstringsprintf(result, fmt, i=i, r=r, d=d, L=L, s=s, n=n, &
        & c1=c1, c2=c2, c3=c3)
end function
