ascii__add_character_char Subroutine

private pure subroutine ascii__add_character_char(self, chara)

Type Bound

ascii_t

Arguments

Type IntentOptional Attributes Name
class(ascii_t), intent(inout) :: self
character(len=1), intent(in) :: chara

Source Code

   pure subroutine ascii__add_character_char(self, chara)
      implicit none
      class(ascii_t), intent(inout) :: self
      character(1), intent(in) :: chara

      integer(int32) :: cp, i, pos

      if (.not. is_valid_multiple_byte_character(trim(chara))) error stop

      cp = ichar(chara)
      i = cp /bits_64
      pos = mod(cp, bits_64)

      self%a(i) = ibset(self%a(i), pos)
   end subroutine ascii__add_character_char