function PARSEENTRIES::removeDelimiters in Bibliography Module 7.2
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.3 plugins/biblio_style/bibtex/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
- 7 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::removeDelimiters()
1 call to PARSEENTRIES::removeDelimiters()
- PARSEENTRIES::removeDelimitersAndExpand in modules/
bibtexParse/ PARSEENTRIES.php
File
- modules/
bibtexParse/ PARSEENTRIES.php, line 336
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;
}