tamtamchik / namecase Goto Github PK
View Code? Open in Web Editor NEWPHP package that converts names into the correct case where it is possible.
Home Page: https://tamtamchika.net/namecase
License: MIT License
PHP package that converts names into the correct case where it is possible.
Home Page: https://tamtamchika.net/namecase
License: MIT License
If the string parameter supplied to nameCase is empty (""
), PHP generates a notice with message "Uninitialized string offset: 0" that comes from here:
Line 122 in b4facc6
It would be better to just check earlier that the string is empty and then return the empty string back instead of trying to access a character that does not exist.
I don't understand most of post nominals and their origin. But is it possible to add exceptions option to not use some of them?
Reason is in Czech and other Slavic languages "Most" can be valid surname - meaning bridge. It is very rare but there are some occasions. Would it be possible to add post nominal exceptions? I don't want to disable all of them.
Btw. some of them are duplicated like BSc or MR etc
"J. D." leaves as it is, but "J.D." converts to "J.d."
Hi I just happened to notice that "MBE" is missing in the POST_NOMINALS constant in src/Formatter.php (it would be on line 86).
"OBE", "CBE", "KBE" and "DBE" are all present, so I assume it's just an oversight.
Andre LaMothe
is converted to Andre Lamothe
Currently if I pass & through, namecase changes it to &Amp; which breaks decoding. Please add an ignore for html encoded entities.
<
, >
, &
, '
and "
.idea
is user-specific and should not appear in a project.gitignore
. Consider adding it to the user global.gitignore
instead.
.idea
build
composer.lock
docs
vendor
Posted from SymfonyInsight
Line 51 in 1128964
There is missing end word boundary, this is causing problems with name Tereza or Tenerife etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.