Skip to content

Add Capital_Underscore_Form#26

Merged
akicho8 merged 4 commits intoakicho8:masterfrom
awr1:capital-underscore
Aug 25, 2018
Merged

Add Capital_Underscore_Form#26
akicho8 merged 4 commits intoakicho8:masterfrom
awr1:capital-underscore

Conversation

@awr1
Copy link
Contributor

@awr1 awr1 commented Aug 19, 2018

I use this form a few times in my code - not quite UPCASE_FORM but instead where the first character of each word is capitalized. The string-inflection-capital-underscore-p function I did could probably be better, but regex is not my forte...

@akicho8 akicho8 self-assigned this Aug 23, 2018
@akicho8
Copy link
Owner

akicho8 commented Aug 23, 2018

Thank you PR.
By the way Capital underscore is a format used in what programming languages?

@awr1
Copy link
Contributor Author

awr1 commented Aug 23, 2018

@akicho8
Copy link
Owner

akicho8 commented Aug 25, 2018

Thank you.
I have looked at the reference URL.
On that basis, I have a little doubt.

  1. Foo_Bar is not capital underscore. Is not it cobra case ?
    Searching for capital underscore will find https://github.com/s-hiroshi/development-guide-public/blob/master/coding-guide/README.md
    FOO_BAR format is called capital underscore. It is likely to get confused.

  2. Are you programmers using OCaml?
    If so, there is no use for the Foo_Bar format. Do you need the Foo_bar format?

  3. What is the name of Ocaml's Foo_bar format?

@awr1
Copy link
Contributor Author

awr1 commented Aug 25, 2018

I have programmed in OCaml occasionally but I don't know what they call that sort of format. Maybe it should be called "Objective_case?"

I remember seeing some C++ code that used this "Cap_Underscore" style a few years ago for types but I don't remember where it was. Since then I have liked to use it for personal projects. If you don't think it's popular enough to warrant an addition (as I myself had difficulty looking this type of style up online) to this package feel free to close this.

@akicho8
Copy link
Owner

akicho8 commented Aug 25, 2018

understood. You want to use it on a personal project.
Let's add capital underscore style if you need it.
Since string-inflection itself was originally for yourself, I would like to add a conversion rule if there is demand for even one person.

@akicho8 akicho8 merged commit 6c3b6c8 into akicho8:master Aug 25, 2018
@akicho8 akicho8 self-requested a review August 25, 2018 14:05
@akicho8
Copy link
Owner

akicho8 commented Aug 25, 2018

We fixed it because there was a part which did not fit a little with master's latest.
So please try using master's latest.

@awr1
Copy link
Contributor Author

awr1 commented Aug 25, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants