From f7645edee1dd2bdf57cd5d9cc59c811e72a82be2 Mon Sep 17 00:00:00 2001 From: Andre Wyrwa Date: Tue, 28 Aug 2018 23:06:52 +1000 Subject: [PATCH 1/2] Update readme with documentation for latest features --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 3bbab33..957ea80 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,22 @@ echo $name; // re-prints the full normalised name ``` An empty string is returned for missing parts. +### Special part retrieval features +#### Explicit last name parts +You can retrieve last name prefixes and pure last names separately with +```php +echo $name->getLastnamePrefix(); +echo $name->getLastname(true); // true enables strict mode for pure lastnames, only +``` + +#### Nick names with normalized wrapping +By default, `getNickname()` returns the pure string of nick names. However, you can +pass `true` to have the same normalised parenthesis wrapping applied as in `echo $name`: +```php +echo $name->getNickname(); // The Giant +echo $name->getNickname(true); // (The Giant) +``` + ### Setting Languages ```php $parser = new TheIconic\NameParser\Parser([ From 51e52ead196fcfef58f6d497eae961aa27c36314 Mon Sep 17 00:00:00 2001 From: Andre Wyrwa Date: Tue, 28 Aug 2018 23:08:56 +1000 Subject: [PATCH 2/2] Remove defunc versioneye badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 957ea80..3500f1d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ [![Latest Stable Version](https://poser.pugx.org/theiconic/name-parser/v/stable?t=201705161308)](https://packagist.org/packages/theiconic/name-parser) [![Total Downloads](https://poser.pugx.org/theiconic/name-parser/downloads?t=201705161308)](https://packagist.org/packages/theiconic/name-parser) [![License](https://poser.pugx.org/theiconic/name-parser/license?t=201705161308)](https://packagist.org/packages/theiconic/name-parser) -[![Dependency Status](https://www.versioneye.com/user/projects/591a676ba593390051b42cdd/badge.svg?style=flat&t=201705161308)](https://www.versioneye.com/user/projects/591a676ba593390051b42cdd) ## Purpose This is a universal, language-independent name parser.