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

Ruby regexp to turn snake_casing to PascalCasing?

I've created a web framework that uses the following function: def to_class(text) text.capitalize text.gsub(/(_|-)/, '') end To turn directory names that are snake_cased or hyphen-cased into PascalCased class names for your project. Problem…
beakr
  • 5,709
  • 11
  • 42
  • 66
2
votes
5 answers

Pascal case edge case

Pascal case now: is it "Nontaxable", or "NonTaxable"?
Eric Smith
  • 5,262
  • 2
  • 33
  • 49
2
votes
4 answers

Convert lower camelCase to PascalCase in c#?

I need to convert camelcase keys to Pascal key and I got good solution from stackoverflow. But the issue is I don't know how to exclude . in conversion. Please find the below example: var input= "customer.presentAddress.streetName"; Expected Output…
Prasanna Kumar J
  • 225
  • 1
  • 13
2
votes
1 answer

How do I make Graphql Code Generator for typescript make its enums into pascal case instead of snake case?

Currently, the enums that Graphql Code Generator produces looks like this export enum Test_Type { Test: 'TEST', } however I want the generated enums to be in pascal case like this: export enum TestType { Test: 'TEST', } Edit, my…
Embedded_Mugs
  • 2,132
  • 3
  • 21
  • 33
2
votes
2 answers

Eslint rule to validate pascal case on react compoent name (only for .tsx extension)

I'm trying to use Eslint to enforce PascalCase on my React components. I've looked at all the existing plugins/rules I could find, and here are my issues: I'm using Typescript (.tsx extensions), so react/jsx-pascal-case won't work for me. For files…
Uri Klar
  • 3,800
  • 3
  • 37
  • 75
2
votes
2 answers

how to use pascal casing instead of camel casing in graphql dotnet

here I have a mutation, as you can see the parameter name is Product with capital P and the field name is CreateProduct with capital C when I execute this mutation from graphical I have to write the name of the field on camel casing and also the…
2
votes
0 answers

Regex for Pascal case and limit of characters [java]

I'm trying to create a regex that will validate a string that only consists of Pascal case and is limited to 10 characters. What I've got so far is based on Alix Axel's answer to the following question: Regex that matches Camel and Pascal Case So…
ShaneC
  • 2,237
  • 2
  • 32
  • 53
2
votes
1 answer

How to Send camelCase Json to C# Web Api to Match Pascal Properties WithOut Error

Currently I'm using this JsonFormatter to send camel-cased data to the client config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); WebApiConfig using…
2
votes
3 answers

Why Hashtable is not PascalCase?

I strongly try to follow general rules in coding styles. But when i look at .NET, i see that some of classes doesn't match PascalCasing rules. One of them is Hashtable and the other one which i remember is Stopwatch. I think there are more which i…
Freshblood
  • 6,285
  • 10
  • 59
  • 96
2
votes
4 answers

Newbie question about PascalCase

ReSharper extension of VS suggest me to use PascalCase in below property. public Color Color { get; private set; } Here Color is Enum type. I would never thought this can be possible because it is same name with type. But it is valid. Is it…
Freshblood
  • 6,285
  • 10
  • 59
  • 96
2
votes
1 answer

How to name symbols for blind programmers

How should I name the symbols I write in a way that they are read correctly by screen readers, so they do not create a barrier for blind programmers? By "symbols" I mean things like variables and function names. For example, if I write a variable…
Thiago Negri
  • 5,221
  • 2
  • 28
  • 39
2
votes
1 answer

Convert Pascal-cased setter to an underscore-separated variable name

This is not as simple as it seems. Most of you are likely thinking of the regex /([A-Z])/_$1/ like I have found all over the Internet, but my particular situation is slightly more complicated. My source string contains more content that I don't…
JMTyler
  • 1,604
  • 2
  • 21
  • 24
1
vote
1 answer

How to Edit Eclipse' Naming Convention

Question is simple: how to edit naming convention of Eclipse? I have two specific issues: I want to use Pascal Naming Convention instead of camel for fields, such as MyField instead of myField. I want eclipse to generate the getter and setter codes…
Osman.Gerwas
  • 141
  • 1
  • 7
1
vote
1 answer

How to split pascal case address in SnowFlake?

In order to create PlaceKey for addresses to link some of my tables, I need to split an address column in SnowFlake. I am not familiar with JavaScript, but I tried Javascript UDF in SnowFlake. Then I don't know how to deal with the addresses like…
1
vote
2 answers

Rewrite hyphenated URL to pascal case using apache mod_rewrite

The user friendly URLs should be hyphened, for example: http://example.com/some-category/some-file My inherited folder structure however, is pascal cased, therefore the rewritten URL should look like…
undefined
  • 3,949
  • 4
  • 26
  • 38