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
1049
votes
15 answers

What is the naming convention in Python for variables and functions?

Coming from a C# background the naming convention for variables and methods are usually either camelCase or PascalCase: // C# example string thisIsMyVariable = "a" public void ThisIsMyMethod() In Python, I have seen the above but I have also seen…
Ray
  • 187,153
  • 97
  • 222
  • 204
605
votes
7 answers

JSON Naming Convention (snake_case, camelCase or PascalCase)

Is there a standard on JSON naming?I see most examples using all lower case separated by underscore, aka snake_case, but can it be used PascalCase or camelCase as well?
GeorgeU
  • 7,819
  • 8
  • 26
  • 38
171
votes
12 answers

How do I convert CamelCase into human-readable names in Java?

I'd like to write a method that converts CamelCase into a human-readable name. Here's the test case: public void testSplitCamelCase() { assertEquals("lowercase", splitCamelCase("lowercase")); assertEquals("Class", splitCamelCase("Class")); …
Frederik
  • 14,156
  • 10
  • 45
  • 53
144
votes
35 answers

How to convert PascalCase to snake_case?

If I had: $string = "PascalCase"; I need "pascal_case" Does PHP offer a function for this purpose?
openfrog
  • 40,201
  • 65
  • 225
  • 373
122
votes
19 answers

.NET - How can you split a "caps" delimited string into an array?

How do I go from this string: "ThisIsMyCapsDelimitedString" ...to this string: "This Is My Caps Delimited String" Fewest lines of code in VB.net is preferred but C# is also welcome. Cheers!
Matias Nino
  • 4,265
  • 13
  • 46
  • 63
50
votes
9 answers

Regex for PascalCased words (aka camelCased with leading uppercase letter)

How do I find all PascalCased words in a document with a regular expression? If you don't know the word Pascal cased, I'm only concerned with leading Upper camel case (i.e., camel cased words in which the first letter is capitalized).
Tom Lehman
  • 85,973
  • 71
  • 200
  • 272
43
votes
11 answers

How can I convert text to Pascal case?

I have a variable name, say "WARD_VS_VITAL_SIGNS", and I want to convert it to Pascal case format: "WardVsVitalSigns" WARD_VS_VITAL_SIGNS -> WardVsVitalSigns How can I make this conversion?
wlz
  • 563
  • 1
  • 4
  • 9
20
votes
8 answers

Built-in function to capitalise the first letter of each word

I don't want to create a custom function for that if such function already exists in SQL Server. Input string: This is my string to convert Expected output: This Is My String To Convert
girish
  • 701
  • 3
  • 12
  • 22
16
votes
2 answers

TypeScript - Use PascalCasing or camelCasing for module names?

I'm wondering if I should use PascalCasing or camelCasing for my modules names, so far I've always used PascalCasing, i.e: Ayolan.Engine.Rendering instead of Ayolan.engine.rendering (I keep PascalCasing for the container, since I want the global…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
14
votes
7 answers

How do I covert kebab-case into PascalCase?

How could I convert this to PascalCase and to camelCase? var text = "welcome-to-a-New-day"; toPascalCase(text); // "WelcomeToANewDAY" toCamelCase(text); // "WelcomeToANewDAY"
11
votes
1 answer

JavaScriptSerializer().Serialize : PascalCase to CamelCase

I have this javascript object var options: { windowTitle : '....', windowContentUrl : '....', windowHeight : 380, windowWidth : 480 } And I have this C# class public class…
user385411
  • 1,445
  • 1
  • 18
  • 35
11
votes
2 answers

How to convert any pascal case JSON object to camel case JSON object?

I tried using CamelCasePropertyNamesContractResolver, however it does not convert pascal property names into camel casing? Note: this is an example only, my json input is unknown, I only the json pascal casing. using Newtonsoft.Json; using…
001
  • 62,807
  • 94
  • 230
  • 350
10
votes
5 answers

How to format a string to Pascal case in XSLT?

I'm trying to format strings in XSLT that needs to be in pascal case to be used appropriately for the application I'm working with. For example: this_text would become ThisText this_long_text would become ThisLongText Is it possible to also set this…
OpenDataAlex
  • 1,375
  • 5
  • 19
  • 39
9
votes
4 answers

MySQL: Can't give tables a name in Upper Camel Case (Pascal Case)

I read that it is best practise to have table names in Pascal Case (ThisIsMyTableName). Therefor I would like to change my tables in MySQL. But neither phpmyadmin, nore SQL Manager 2005 for MySQL will let me. The names stay to appear in lowercase,…
Pascal Klein
  • 23,665
  • 24
  • 82
  • 119
9
votes
7 answers

Regex that matches Camel and Pascal Case

I'm about to write a parser for a language that's supposed to have strict syntactic rules about naming of types, variables and such. For example all classes must be PascalCase, and all variables/parameter names and other identifiers must be…
Marcin
  • 7,874
  • 7
  • 45
  • 49
1
2 3 4 5