original_string: public static function encodeQuotedPrintable($str,
          $lineLength = self::LINELENGTH,
          $lineEnd = self::LINEEND)
      {
          $out = '';
          $str = self::_encodeQuotedPrintable($str);
  
          // Split encoded text into separate lines
          while ($str) {
              $ptr = strlen($str);
              if ($ptr > $lineLength) {
                  $ptr = $lineLength;
              }
  
              // Ensure we are not splitting across an encoded character
              $pos = strrpos(substr($str, 0, $ptr), '=');
              if ($pos !== false && $pos >= $ptr - 2) {
                  $ptr = $pos;
              }
  
              // Check if there is a space at the end of the line and rewind
              if ($ptr > 0 && $str[$ptr - 1] == ' ') {
                  --$ptr;
              }
  
              // Add string and continue
              $out .= substr($str, 0, $ptr) . '=' . $lineEnd;
              $str = substr($str, $ptr);
          }
  
          $out = rtrim($out, $lineEnd);
          $out = rtrim($out, '=');
          return $out;
      }
code: public static function encodeQuotedPrintable($str,
          $lineLength = self::LINELENGTH,
          $lineEnd = self::LINEEND)
      {
          $out = '';
          $str = self::_encodeQuotedPrintable($str);
  
          // Split encoded text into separate lines
          while ($str) {
              $ptr = strlen($str);
              if ($ptr > $lineLength) {
                  $ptr = $lineLength;
              }
  
              // Ensure we are not splitting across an encoded character
              $pos = strrpos(substr($str, 0, $ptr), '=');
              if ($pos !== false && $pos >= $ptr - 2) {
                  $ptr = $pos;
              }
  
              // Check if there is a space at the end of the line and rewind
              if ($ptr > 0 && $str[$ptr - 1] == ' ') {
                  --$ptr;
              }
  
              // Add string and continue
              $out .= substr($str, 0, $ptr) . '=' . $lineEnd;
              $str = substr($str, $ptr);
          }
  
          $out = rtrim($out, $lineEnd);
          $out = rtrim($out, '=');
          return $out;
      }
code_tokens: public static function encodeQuotedPrintable ( $ str , $ lineLength = self :: LINELENGTH , $ lineEnd = self :: LINEEND ) { $ out = '' ; $ str = self :: _encodeQuotedPrintable ( $ str ) ; // Split encoded text into separate lines while ( $ str ) { $ ptr = strlen ( $ str ) ; if ( $ ptr > $ lineLength ) { $ ptr = $ lineLength ; } // Ensure we are not splitting across an encoded character $ pos = strrpos ( substr ( $ str , 0 , $ ptr ) , '=' ) ; if ( $ pos !== false && $ pos >= $ ptr - 2 ) { $ ptr = $ pos ; } // Check if there is a space at the end of the line and rewind if ( $ ptr > 0 && $ str [ $ ptr - 1 ] == ' ' ) { -- $ ptr ; } // Add string and continue $ out .= substr ( $ str , 0 , $ ptr ) . '=' . $ lineEnd ; $ str = substr ( $ str , $ ptr ) ; } $ out = rtrim ( $ out , $ lineEnd ) ; $ out = rtrim ( $ out , '=' ) ; return $ out ; }
docstring: Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
  
  @param string $str
  @param int $lineLength Defaults to {@link LINELENGTH}
  @param int $lineEnd Defaults to {@link LINEEND}
  @return string
docstring_tokens: Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines .