-
Couldn't load subscription status.
- Fork 196
-
Hello,
Is there a stdlib function which allows to convert an integer to a character vector (opposite of ichar if I understand well)?
I mean, something more or less like:
function itoa(i) result(res) !------------------------------------------------------------------------------------------ !! Convert integer to string. !------------------------------------------------------------------------------------------ integer, intent(in) :: i !! Integer character(:), allocatable :: res character(range(i)+2) :: tmp write(tmp,'(i0)') i res = trim(tmp) end function
Thanks for any hint.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks a lot, @jvdp1. Now that you told me where to search for, I realized that the section Contributing and specs has all the necessary explanations, but I never thought of looking under than title... I searched directly under Modules and Procedures and got lost. Perhaps we could rename Contributing and specs to API reference (as numpy) or similar.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1