Comments (3)
In the case of my simple example, the function is simply upper-casing each word in the title, and changing all others to lowercase.
Exactly.
For proper title casing, the words "and", "the" and "of" should remain lower case.
According to some rules of capitalization, yes. But that's not what MB_CASE_TITLE does - it's too sophisticated a requirement for a library devoted to handling character encodings. What you're looking for would have to be something powered by a database of (English) words and casing rules.
Ideally, the acronym NIMH should remain all caps, but that is a much smaller issue.
A reasonable expectation, but again, that's not what MB_CASE_TITLE does: it manages case for everything in the string, not just the first letters of words.
from doc-en.
At least, The behavior of mb_convert_case
has been unified from past versions.
In the first place, mb_convert_case
can't understand context of the sentence.
I seems correct behavior of mb_convert_case
at now.
from doc-en.
OK, I can accept that it's too complex and will write my own function.
But then is it possible to make the flag constant (or at least the documentation) say explicitly that it's capitalizing every word? Describing it as "title case" is confusing, since by definition that would imply a "title" context.
Thank you.
from doc-en.
Related Issues (20)
- Update PHP tags documentation
- VIPCLUBBGPLW
- Hai
- SQLite3::busyTimeout documentation incomplete
- Incorrect return types(`void` is appended) HOT 6
- Strstr() Usage Note HOT 1
- Clarify what level of php.ini settings can be set via FPM pools
- XMLReader::isValid() docs are too vague
- Unexpected return values: strcmp(), strncmp(), strcasecmp(), strncasecmp HOT 6
- max function does not compare PHP_FLOAT_MIN and 0 correctly HOT 2
- PHP 8.0 incompatible changes mistake? HOT 1
- array_intersect doesn't support named arguments HOT 3
- PHP 2024 Documentation Roadmap HOT 7
- Wrong arrow function code example (third example) HOT 3
- WeakReference::create is subtly incorrect
- Initialisation of readonly properties by reference does not work (e.g. matches of preg_match) HOT 3
- Interactive code examples on php.net HOT 4
- ini_set('date.sunrise_zenith', 90) has no effect HOT 1
- .
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doc-en.