Questions tagged [pascalcasing]

Pascal case is a language-independent naming convention in which each word of an identifier name begins with a capital letter, such as CustomerName, CustomerId, etc.

In Pascal case, there is no indicator of the data type of the identifier. The name will be descriptive only, and not indicate types.

Examples of Pascal case: CustomerName, CustomerId, PostalCode, PrintInvoice

See also

61 questions
8
votes
1 answer

Why are some Django methods PascalCase and others snake_case?

As far as I know, the convention is to use snake_case for method names, so why are some methods in Django PascalCase, e.g. Django's TestCase Class?
8
votes
4 answers

Convert text in PascalCase

Is it possible to convert text from a table column in SQL Server to PascalCase only using a proper SQL code? TABLE DEFINITION ---------------------- ID int CITTA varchar(50) PROV varchar(50) CAP varchar(50) COD varchar(50) The field that…
Lorenzo
  • 29,081
  • 49
  • 125
  • 222
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
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
3 answers

Split PascalCase string except for acronyms

I have a list of words that need to be made human readable, such as FirstName to First Name, LastName to Last Name, and in some cases, acronyms like ARBs to remain as is. The latter was recently introduced and has caused a display issue since our…
Mathachew
  • 2,044
  • 2
  • 18
  • 31
7
votes
2 answers

ToPascalCase() C# for all caps Abbreviations

I am using ReSharper and trying to abide by it's default rules. In part of my code, I need to change a string Property to PascalCase. I have tried numerous methods but cannot find one that works for things which include all capital…
Torrey Braman
  • 79
  • 1
  • 6
6
votes
2 answers

Change all keys in an array from snake_case to PascalCase

I want to replace all index keys in a array but I need to do it only with a function like array_map() (not with a foreach) and that's why it's a little hard for me. Actual array: $array = [ 'mc_gross' => 10.17, 'protection_eligibility' =>…
ZoRo
  • 85
  • 2
  • 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
1 answer

Imported JSX component NewsСardMedium must be in PascalCase – isn't it?

I'm tired of endless warnings about PascalCase and unfortunately I found nothing in search, so decided to ask here - whats wrong with these components naming, aren't they already in PascalCase? Imported JSX component NewsСardLarge must be in…
Vladislav Sorokin
  • 369
  • 1
  • 2
  • 14
5
votes
2 answers

Moving Spring Boot 1.3 to 1.4, Hibernate 4 to 5, Pascal Case Issues

I created a Spring Boot 1.3.5 POC with Spring Data JPA and Hibernate (4.3.11.Final in this version of Spring Boot). My backend database is Microsoft SQL Server, and our standard naming convention for database objects is pascal case (e.g.…
Rob Streeter
  • 187
  • 3
  • 12
5
votes
4 answers

Javascript convert unicode string to "Title Case"

I have a javascript case conversion problem which I cannot solve due to non-English letters. My main concern is the Turkish alphabet. What I need to do is this: hello world => Hello World HELLO WORLD => Hello World hELLO wOrLd => Hello World Here…
Serkan Durusoy
  • 5,447
  • 2
  • 20
  • 39
4
votes
4 answers

First word from PascalCase as lowercase

I have a string that contains text in PascalCase and I need to extract first word from it and convert it to lowercase: assert firstWord('PmdExtension') == 'pmd' assert firstWord('PMDExtension') == 'p' assert firstWord('Pmd') == 'pmd' assert…
Michal Kordas
  • 10,475
  • 7
  • 58
  • 103
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
3
votes
2 answers

API standard for JS / C# interface - Camel vs. Pascal case

We have a system where a server written in C# implements a REST interface and the client is written in JS, most of the data is passed as JSON. In a way there is here a collision between the camelCase and PascalCase worlds. The parameters mostly…
Thomas
  • 10,933
  • 14
  • 65
  • 136
3
votes
4 answers

CamelCase JSON WebAPI Sub-Objects (Nested objects, child objects)

I'm creating a complex object with children (nested objects) to be returned from my web api controller. The object contains list of other object types. These sub-object types within the list follow the pascal casing used in .NET. var persons =…
Andre Young
  • 61
  • 1
  • 7