code: public static function TRIMNONPRINTABLE($stringValue = '')
      {
          $stringValue = Functions::flattenSingleValue($stringValue);
  
          if (is_bool($stringValue)) {
              return ($stringValue) ? Calculation::getTRUE() : Calculation::getFALSE();
          }
  
          if (self::$invalidChars == null) {
              self::$invalidChars = range(chr(0), chr(31));
          }
  
          if (is_string($stringValue) || is_numeric($stringValue)) {
              return str_replace(self::$invalidChars, '', trim($stringValue, "\x00..\x1F"));
          }
  
          return null;
      }
docs: TRIMNONPRINTABLE.
  
  @param mixed $stringValue Value to check
  
  @return string