You are here

function biblio_remove_brace in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 biblio.module \biblio_remove_brace()
  2. 7 biblio.module \biblio_remove_brace()
  3. 7.2 biblio.module \biblio_remove_brace()

Removes curly braces from a string.

Parameters

string $title_string: The text string to remove curly braces from.

Return value

string The resulting string with curly braces removed.

8 calls to biblio_remove_brace()
biblio_block in ./biblio.module
Implements hook_block().
biblio_handler_citation::render in views/biblio_handler_citation.inc
biblio_ris_biblio_export in modules/RIS/biblio_ris.module
biblio_rtf_biblio_export in modules/rtf/biblio_rtf.module
biblio_show_results in includes/biblio.pages.inc
biblio_show_results takes the query results from biblio_db_search and adds some controls to the page then loops through the results applying the selected style to each entry

... See full list

File

./biblio.module, line 1216
Main file for Drupal module biblio.

Code

function biblio_remove_brace($title_string) {

  //$title_string = utf8_encode($title_string);
  $matchpattern = '/\\{\\$(?:(?!\\$\\}).)*\\$\\}|(\\{[^}]*\\})/';
  $output = preg_replace_callback($matchpattern, 'biblio_remove_brace_callback', $title_string);
  return $output;
}