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
8
votes
3 answers

Ruby API response as lower camel case

I'm trying to return the API response as lowerCamelCase but it is not working, I need to do this for all my Controllers/fields so I need a solution for entire project. I've tried a lot of stuff, including this…
8
votes
2 answers

Algorithm to format text to Pascal or camel casing

Using this question as the base is there an alogrithm or coding example to change some text to Pascal or Camel casing. For example: mynameisfred becomes Camel: myNameIsFred Pascal: MyNameIsFred
JamesSugrue
  • 14,891
  • 10
  • 61
  • 93
8
votes
3 answers

PHP regex and adjacent capturing groups

I'm using capturing groups in regular expressions for the first time and I'm wondering what my problem is, as I assume that the regex engine looks through the string left-to-right. I'm trying to convert an UpperCamelCase string into a…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
8
votes
3 answers

Change forward-word/backward-word/kill-word for CamelCase Words in Emacs

I need to ability to navigate and edit parts of a camel cased word in Emacs. Functionality similar to camel humps in Intellij IDEA. For example I need Blah,Foo and Bar in the string BlahFooBar to be identified as 3 separate words so I could…
Raghu
  • 2,004
  • 1
  • 16
  • 18
8
votes
4 answers

How to use Pascal Casing and Camel Casing for Short Acronyms in C#?

A short acronym is like ID or DB which has only 2 characters. How to name these when pascal casing (for Property or Class names) and for Camel Casing (input prameters, arguments)? I know each Company has their own standard but I'm looking for a more…
The Light
  • 26,341
  • 62
  • 176
  • 258
7
votes
4 answers

What is the point of the lower camel case variable casing convention (thisVariable, for example)?

I hope this doesn't get closed due to being too broad. I know it comes down to personal preference, but there is an origin to all casing conventions and I would like to know where this one came from and a logical explanation as to why people use…
oscilatingcretin
  • 10,457
  • 39
  • 119
  • 206
7
votes
1 answer

Python + Flask REST API, how to convert data keys between camelcase and snakecase?

I am learning Python, and coding simple REST API using Flask micro-framework. I am using SQLAlchemy for Object-relational-mapping and Marshmallow for Object-serialization/deserialization. I am using snakecase for my variable names(according to…
Yoh0xFF
  • 1,450
  • 2
  • 18
  • 31
7
votes
4 answers

Displaying camel cased words as such with underscores in Eclipse

To me, reading long camel cased words can sometimes be a bit frustrating. For example: aReallyLongCamelCasedMethodNameWhichIsTooSelfDescribing Now, look at this version: a_Really_Long_Camel_Cased_Method_Name_Which_Is_Too_Self_Describing Which…
darioo
  • 46,442
  • 10
  • 75
  • 103
7
votes
1 answer

Exclude from CamelCase tokenizer in Elasticsearch

Struggling to make iPhone match when searching for iphone in Elasticsearch. Since I have some source code at stake, I surely need CamelCase tokenizer, but it appears to break iPhone into two terms, so iphone can't be found. Anyone knows of a way to…
tishma
  • 1,855
  • 1
  • 21
  • 43
7
votes
4 answers

Why use Camel Case for JS and Snake Case for your DB?

I have been told to use snake case in my DB and never camelCase. JSON API says to use dashes between words for object keys. Javascript, everyone uses camelCase. If I have a RAILS server getting data from an SQL database, sending it as json and being…
P0lska
  • 461
  • 1
  • 6
  • 17
7
votes
3 answers

Why doesn't the instanceof operator use camelcase notation?

Foo bar = new Foo(); if(bar instanceof Foo){ ... // it's true } I was just wondering why we don't use camelcase notation (instanceOf) instead of how it is (instanceof).
grey00
  • 469
  • 2
  • 13
7
votes
3 answers

Upper and Lower camel case

I am trying to come up with a regex for both Upper and lower Camel case. Here is what I tried (([A-Z][a-z0-9]*){2,}|([a-z][A-Z0-9]*){2,}) Trying to match Upper camel case with this - ([A-Z][a-z0-9]){2,} but it is matching other combinations as…
Ankit
  • 201
  • 4
  • 12
7
votes
3 answers

XMLSerializer keeps capitalizing items in collection

I need to export a collection of items in camel casing, for this I use a wrapper. The class itself: [XmlRoot("example")] public class Example { [XmlElement("exampleText")] public string ExampleText { get; set; } } This serializes…
siebz0r
  • 18,867
  • 14
  • 64
  • 107
6
votes
2 answers

CamelCase Expansion in Vim like Intellij Idea?

In Intellij Idea, there's a feature. Let's say I have used a variable myCamelCase somewhere in my code. Then if I type mCC and press Ctrl-Enter or some such key combination, it expands to myCamelCase. Is there something similar in Vim?
simplfuzz
  • 12,479
  • 24
  • 84
  • 137
6
votes
3 answers

Does Resharper 4.1 support both Camel Humps and normal selection modes?

I've found the setting for Camel Humps in resharper: Resharper -> Options -> Editor -> Use CamelHumps The problem is that I would still like to be able to use the normal selection mode (i.e. the default behaviour for CTRL+Arrow and CTRL+SHIFT+Arrow)…
Jonathan Parker
  • 6,705
  • 3
  • 43
  • 54