original_string: public static function slashJS($string, $extended = FALSE, $char = "'") {
  		if ($extended) {
  			$string = str_replace("\\", "\\\\", $string);
  		}
  		return str_replace($char, "\\" . $char, $string);
  	}
code: public static function slashJS($string, $extended = FALSE, $char = "'") {
  		if ($extended) {
  			$string = str_replace("\\", "\\\\", $string);
  		}
  		return str_replace($char, "\\" . $char, $string);
  	}
code_tokens: public static function slashJS ( $ string , $ extended = FALSE , $ char = "'" ) { if ( $ extended ) { $ string = str_replace ( "\\" , "\\\\" , $ string ) ; } return str_replace ( $ char , "\\" . $ char , $ string ) ; }
docstring: This function is used to escape any ' -characters when transferring text to JavaScript!
  
  @param string $string String to escape
  @param boolean $extended If set, also backslashes are escaped.
  @param string $char The character to escape, default is ' (single-quote)
  @return string Processed input string
docstring_tokens: This function is used to escape any - characters when transferring text to JavaScript!