_locale_import_parse_quoted

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 _locale_import_parse_quoted($string)

Parses a string in quotes

Übergabeparameter

$string A string specified with enclosing quotes

Rückgabewert

The string parsed from inside the quotes

Verwandte Themen

Code

includes/locale.inc, line 1861

<?php
function _locale_import_parse_quoted($string) {
  if (substr($string, 0, 1) != substr($string, -1, 1)) {
    return FALSE; // Start and end quotes must be the same
  }
  $quote = substr($string, 0, 1);
  $string = substr($string, 1, -1);
  if ($quote == '"') { // Double quotes: strip slashes
    return stripcslashes($string);
  }
  elseif ($quote == "'") { // Simple quote: return as-is
    return $string;
  }
  else {
    return FALSE; // Unrecognized quote
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen