You are here

function EducateDashes in Typogrify 7

Same name and namespace in other branches
  1. 5 smartypants.php \EducateDashes()
  2. 6 smartypants.php \EducateDashes()

Example input: `Isn't this fun?' Example output: ‘Isn’t this fun?’

Parameters

string $_: Input text.

Return value

string The string, with each instance of "--" translated to an em-dash HTML entity.

1 call to EducateDashes()
SmartyPants in ./smartypants.php
SmartyPants.
1 string reference to 'EducateDashes'
SmartDashes in ./smartypants.php
SmartDashes.

File

./smartypants.php, line 972
SmartyPants - Smart punctuation for web sites

Code

function EducateDashes($_) {
  $_ = str_replace('--', '—', $_);
  return $_;
}