Camel case is a language-independent naming convention in which an identifier name will start with a lowercase letter and each additional word within the name will start uppercase, such as customerName, printInvoice, etc.
Questions tagged [camelcasing]
403 questions
6
votes
1 answer
Why react wai-aria is not in camelCase?
From react docs
Note that all aria-* HTML attributes are fully supported in JSX.
Whereas most DOM properties and attributes in React are camelCased,
these attributes should be hyphen-cased (also known as kebab-case,
lisp-case, etc) as they are in…

Sang
- 4,049
- 3
- 37
- 47
6
votes
2 answers
Snippet regex: match arbitrary number of groups and transform to CamelCase
In a Visual Studio Code Snippet I'm writing I want to convert a snake case string to camel case.
From the docs I know that the syntax is
'${' var '/' regex '/' (format | text)+ '/' options '}'
so I've come up with this…

Darya
- 89
- 1
- 3
6
votes
1 answer
Split a camelCase string with regex
I have a Camel case string like this s = 'ThisIsASampleString' and I want to split into an array using the capital letters as the delimiting point. I am expecting this:
['This', 'Is', 'A', 'Sample', 'String']
Here is what I have done so far
s =…

Ezio
- 2,837
- 2
- 29
- 45
6
votes
8 answers
RestSharp Serialize JSON in camelCase
I am trying to post JSON in camelCase, and have followed the instructions here:
https://github.com/restsharp/RestSharp/wiki/Deserialization#overriding-jsonserializationstrategy
public class CamelCaseSerializerStrategy : PocoJsonSerializerStrategy
{
…

Shibbz
- 239
- 1
- 4
- 13
6
votes
1 answer
camelCase POST data in Django REST Framework
I see there is project called djangorestframework-camel-case, which allows to use JavaScript-ish camelCase with underscore_cased fields in Django REST serializers. So, basically, I can send:
{
"camelCase": "foo"
}
And receive it with following…

m4tx
- 4,139
- 5
- 37
- 61
6
votes
2 answers
Naming local constants: UpperCamelCase or lowerCamelCase?
Which naming convention do you use for local constants in C# and why?
const int Pi = 3;
const int pi = 3;
It seems the trade-off is between lower camel-case indicating restricted scope, and upper camel-case being more readable and easier to move to…

Anthony Faull
- 17,549
- 5
- 55
- 73
6
votes
1 answer
Avoiding CamelCasePropertyNamesContractResolver for a specific method
I have web api controllers and I am using this method of configuration in WebApiConfig file for camel casing my results for all controllers.
var json =…

ahmadalibaloch
- 5,851
- 2
- 50
- 59
6
votes
3 answers
Getters/setters when first word has second letter capitalized
What should we expect from the following name? : mGage Program
if I camelCase this it will be mGageProgram and if I generate (in eclipse) the getters and setters I will get the following:
public String getmGageProgram() {
return…

Garis M Suero
- 7,974
- 7
- 45
- 68
6
votes
5 answers
Convert a Sentence to InitCap / camel Case / Proper Case
I have made this code. I want a small regexp for this.
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
String.prototype.initCap = function () {
var new_str = this.split(' '),
i,
…

Tushar Gupta - curioustushar
- 58,085
- 24
- 103
- 107
6
votes
0 answers
What is the convention for writing Matlab code: CamelCase or snake_case
What is the convention for writing Matlab code as used in built-in matlab functions and major toolboxes: CamelCase or snake_case?

user1710794
- 105
- 1
- 6
6
votes
2 answers
Forcing Entity Framework generated classes to have Pascal casing and column names to have Camel casing
I have been working with Entity Framework 4 and SQL Server. The main problem I have found is that the table names in the database are all lower case and has underscore. This means that when I create the entities in Visual Studio, the classes and the…

Xavier
- 1,672
- 5
- 27
- 46
5
votes
3 answers
lowercase and uppercase file name
I used codeigniter framework on my localhost, i named some of my models and controllers using the camel case method(UserModel,DbModel) on windows.Now when i uploaded the files to the server(running on linux) the script is trying to load all the…

andrei
- 8,252
- 14
- 51
- 66
5
votes
1 answer
JSON serialize a class and change property casing with Python
I'd like to create a JSON representation of a class and change the property names automatically from snake_case to lowerCamelCase, as I'd like to comply with PEP8 in Python and also the JavaScript naming conventions (and maybe even more importantly,…

Vince Varga
- 6,101
- 6
- 43
- 60
5
votes
1 answer
Jersey JSON switching from camel case to underscores (snake case)
I recently switched to jersey 2 ,.
I went through the documentation/web and got to know how to convert response class to custom class using .readEntity(ClassName.class);
But I am stuck at using CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES naming…

k1133
- 315
- 3
- 12
5
votes
3 answers
Why are my camel cased actions in Zend MVC attempting to call non-camelcased method names?
The Zend standard for action names is camelCase, yet if I create an action with camel casing, the request fails because it tries to call the method (action) without the camel casing!
Example:
I have an action named "changeEmail" in module "abc". …

MikeH
- 796
- 7
- 18