Giter Club home page Giter Club logo

Comments (3)

damianwadley avatar damianwadley commented on August 22, 2024

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.

youkidearitai avatar youkidearitai commented on August 22, 2024

https://3v4l.org/2h7Zq

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.

leeksoup avatar leeksoup commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.