input: Write a function to convert an HTML string to plain text format without using any external libraries. The function should remove all HTML tags and return the cleaned text.
  
  def html_to_text(html_string):
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif in_tag == False:
              output += char
      return output
  
  assert html_to_text('<h1>Hello World</h1>') == 'Hello World'
  assert html_to_text('<p>This is a paragraph <b>with bold</b> text.</p>') == 'This is a paragraph with bold text.'
  assert html_to_text('<div><img src="example.jpg"></div>') == ''
  assert html_to_text('No tags here') == 'No tags here'
  assert html_to_text('') == ''
output: def html_to_text(html_string):
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif in_tag == False:
              output += char
      return output