public function HumanNameParser_Name::setStr in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/Name.php \HumanNameParser_Name::setStr()
Checks encoding, normalizes whitespace/punctuation, and sets the name string.
Parameters
string $str: a utf8-encoding string.
Return value
Bool True on success
1 call to HumanNameParser_Name::setStr()
- HumanNameParser_Name::__construct in includes/
Name.php
File
- includes/
Name.php, line 25
Class
- HumanNameParser_Name
- Does cutting and matching stuff with a name string. Note that the string has to be UTF8-encoded.
Code
public function setStr($str) {
if (!drupal_validate_utf8($str)) {
throw new Exception("Name is not encoded in UTF-8");
}
$this->str = $str;
$this
->norm();
return TRUE;
}