Questions tagged [camelcasing]

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.

403 questions
4
votes
2 answers

Identify if a string is camelCase

I'm trying to get PHP_CodeSniffer to check for camelCase in class names, however it seems to me camelCase checking is impossible (without a dictionary, including techy words). I've raked the internet but so far the only options I've seen would be…
James
  • 4,644
  • 5
  • 37
  • 48
4
votes
5 answers

Reformatting a Java String

I have a string that looks like this: CALDARI_STARSHIP_ENGINEERING and I need to edit it to look like Caldari Starship Engineering Unfortunately it's three in the morning and I cannot for the life of me figure this out. I've always had trouble…
Travis
  • 47
  • 4
4
votes
1 answer

Combine regular expressions for splitting camelCase string into words

I managed to implement a function that converts camel case to words, by using the solution suggested by @ridgerunner in this question: Split camelCase word into words with php preg_match (Regular Expression) However, I want to also handle embedded…
stou
  • 63
  • 6
4
votes
3 answers

The correct case&format of variable and methods and for Python

So I know some languages have expected conventions. PHP - underscore_case() [for the most part, lolo] Java - camelCase() C# - PascalCase() etc. What's the "Pythonic" naming convention? I know it doesn't matter in the end but just wondering if…
y2k
  • 65,388
  • 27
  • 61
  • 86
4
votes
1 answer

How does Laravel route::controller handle camel/snake case?

in routes.php: Route::controller('account', 'AccountController'); in ajax -> controller: POST /account/password_reset -> postPasswordReset //not working POST /account/passwordReset -> postPasswordReset //not working POST…
Damon
  • 10,493
  • 16
  • 86
  • 144
4
votes
2 answers

First letter capitalisation with multiple cursors in sublime

In sublime if I use cmd+D to select every occurrence of 'old' the selection is case insensitive so will match old and camelOld. But when I start typing the capitalisation is not respected so i will get new and camelnew. Are there any shortcuts or…
wheresrhys
  • 22,558
  • 19
  • 94
  • 162
4
votes
3 answers

JavaScript: regex CamelCase to Sentence

I've found this example to change CamelCase to Dashes. I've modified to code to change CamelCase to Sentencecase with spaces instead of dashes. It works fine but not for one word letters, like "i" and "a". Any ideas how to incorporate that as…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
4
votes
3 answers

NHibernate: why field.camelcase?

Can someone tell me why in NHibernate mapping we can set access="field.camelcase", since we have access="field" and access="property"? EDIT: my question is "why we can do this", not "what does it mean". I think this can be source of error for…
Francois
  • 10,730
  • 7
  • 47
  • 80
3
votes
4 answers

underscore to camelCase RegEx

Our standards have changed and I want to do a 'find and replace' in say Dreamweaver(it allows for RegEx or we just got Visual Studio 2010, if it allows for searching by RegEx) for all the underscores and camelCase them. What would be the RegEx to…
3
votes
1 answer

PHP preg_replace backreference causing undefined constant notice

I'm trying to use NameCase a php class on code.google.com. When I run it I get this notice and I don't understand why. PHP Notice: Use of undefined constant Mc - assumed 'Mc' in namecase.php(54) : regexp code on line 1 53 if(…
Brandon
  • 320
  • 1
  • 4
  • 13
3
votes
3 answers

Given string is not converting into camelCase in python?

Recently I have a made a function in python which converts any string in camelCase format, but while passing different types of string in this function I got into a problem when I tried to pass "BirdFlight" it did not convert it into camelCase. NOTE…
Kunal Tanwar
  • 1,209
  • 1
  • 8
  • 23
3
votes
2 answers

Is it possible to get WCF DataServices JSON Results to always return camelCase?

I'm hoping to use an OData endpoint hosted by WCF DataServices in my project calling it from a javascript front-end. It is important that the property names on the JSON objects follow Javascript conventions rather than c# conventions…
brendanjerwin
  • 1,381
  • 2
  • 11
  • 25
3
votes
0 answers

Expose GET-Params for django-filter als CamelCase

I was wondering if I can expose the GET-parameters required for django-filter somehow as CamelCase instead of snake_case. Meaning…
Ron
  • 22,128
  • 31
  • 108
  • 206
3
votes
1 answer

camelCase in Swagger documentation

is it possible to change property names to camelCase in Swagger documentation? I'm using .NET Core 2.2 and Swashbuckle.AspNetCore 5.2.1. I've tried to use DescribeAllParametersInCamelCase() method in Startup.cs but nothing has changed. Help! My…