Converting any string into camel case

How can I convert a string into camel case using javascript regex? EquipmentClass name or Equipment className or equipment class name or Equipment Class Name should all become: equipmentClassName. 41 Answers 41 Looking at your code, you can achieve it with only two replace calls: function camelize(str) { return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) { return index … Read more

How to navigate through the source code by parts in CamelCase (instead of whole words)?

I remember when I was using Eclipse that when holding CTRL and using left or right arrows Eclipse would navigate over the LongCamelCaseWrittenWord in several steps. One camel case word at time. So it will go like follows (pipe | represents the actual cursor position): |LongCamelCaseWrittenWord -> CTRL+RIGHT_ARROW -> Long|CamelCaseWrittenWord -> CTRL+RIGHT_ARROW -> LongCamel|CaseWrittenWord -> … Read more

How can I return camelCase JSON serialized by JSON.NET from ASP.NET MVC controller methods?

My problem is that I wish to return camelCased (as opposed to the standard PascalCase) JSON data via ActionResults from ASP.NET MVC controller methods, serialized by JSON.NET. As an example consider the following C# class: public class Person { public string FirstName { get; set; } public string LastName { get; set; } } By … Read more

Acronyms in CamelCase [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago. Improve this question I have a doubt about CamelCase. Suppose you have this acronym: Unesco = United Nations Educational, … Read more

JSON Naming Convention (snake_case, camelCase or PascalCase) [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago. Improve this question Is there a standard on JSON naming?I see most examples using all lower case separated by … Read more