function _locale_strip_quotes
Same name and namespace in other branches
- 10 core/modules/locale/locale.module \_locale_strip_quotes()
- 11.x core/modules/locale/locale.module \_locale_strip_quotes()
- 9 core/modules/locale/locale.module \_locale_strip_quotes()
- 8.9.x core/modules/locale/locale.module \_locale_strip_quotes()
Removes the quotes and string concatenations from the string.
Parameters
string $string: Single or double quoted strings, optionally concatenated by plus (+) sign.
Return value
string String with leading and trailing quotes removed.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement.
See also
https://www.drupal.org/node/3619103
File
-
core/
modules/ locale/ locale.module, line 666
Code
function _locale_strip_quotes($string) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3619103', E_USER_DEPRECATED);
return implode('', preg_split('~(?<!\\\\)[\'"]\\s*\\+\\s*[\'"]~s', substr($string, 1, -1)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.