code: public function readUntil($char, $discard_char = true)
      {
          $value = '';
  
          while(null !== ($one = $this->readOne())) {
              if ($one !== $char || !$discard_char) {
                  $value .= $one;
              }
  
              if ($one === $char) {
                  break;
              }
          }
  
          return $value;
      }
docs: Read characters until we reach the given character $char.
  By default, discard that final matching character and return
  the rest.