function PARSEENTRIES::removeDelimiters in Bibliography Module 7.3
Same name and namespace in other branches
- 5 bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
- 6.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
- 6 bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
- 7 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
- 7.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
1 call to PARSEENTRIES::removeDelimiters()
- PARSEENTRIES::removeDelimitersAndExpand in plugins/
biblio_style/ bibtex/ PARSEENTRIES.php
File
- plugins/
biblio_style/ bibtex/ PARSEENTRIES.php, line 333
Class
Code
function removeDelimiters($string) {
if ($string && $string[0] == "\"") {
$string = substr($string, 1);
$string = substr($string, 0, -1);
}
else {
if ($string && $string[0] == "{") {
if (strlen($string) > 0 && $string[strlen($string) - 1] == "}") {
$string = substr($string, 1);
$string = substr($string, 0, -1);
}
}
else {
if (!is_numeric($string) && !array_key_exists($string, $this->strings) && array_search($string, $this->undefinedStrings) === FALSE) {
$this->undefinedStrings[] = $string;
// Undefined string that is not a year etc.
return '';
}
}
}
return $string;
}