elemental function to_integer_I1P(self, kind) result(to_number)
!< Cast string to integer (I1P).
!<
!<```fortran
!< use penf
!< type(string) :: astring
!< integer(I1P) :: integer_
!< logical :: test_passed(1)
!< astring = '127'
!< integer_ = astring%to_number(kind=1_I1P)
!< test_passed(1) = integer_==127_I1P
!< print '(L1)', all(test_passed)
!<```
!=> T <<<
class(string), intent(in) :: self !< The string.
integer(I1P), intent(in) :: kind !< Mold parameter for kind detection.
integer(I1P) :: to_number !< The number into the string.
if (allocated(self%raw)) then
if (self%is_integer()) read(self%raw, *) to_number
endif
endfunction to_integer_I1P