original_string: public static function sanitizeLength($input, $maxLen)
      {
          if(isset($input[$maxLen]))     // take string as array of chars
              return substr($input,0,$maxLen);
          else
              return $input;
      }
code: public static function sanitizeLength($input, $maxLen)
      {
          if(isset($input[$maxLen]))     // take string as array of chars
              return substr($input,0,$maxLen);
          else
              return $input;
      }
code_tokens: public static function sanitizeLength ( $ input , $ maxLen ) { if ( isset ( $ input [ $ maxLen ] ) ) // take string as array of chars return substr ( $ input , 0 , $ maxLen ) ; else return $ input ; }
docstring: Shortens the input string to the max length if it is to long.
  @param string $input
  @param int $maxLen
  @return string sanitized string
docstring_tokens: Shortens the input string to the max length if it is to long .