Header Casing Mixed-Styles Check

Classify ASCII header spelling as lowercase, uppercase, camel, Pascal, snake, kebab, title, or unknown, reporting distinct styles and whether more than one recognized style occurs.

Description

Header casing conventions include single lowercase words, uppercase words, camelCase, PascalCase, snake_case and kebab-case.

Header casing conventions include single lowercase words, uppercase words, camelCase, PascalCase, snake_case and kebab-case. Mixing recognized conventions can make generated code and imported field names harder to keep consistent.1

Classify ASCII header spelling as lowercase, uppercase, camel, Pascal, snake, kebab, title, or unknown, reporting distinct styles and whether more than one recognized style occurs.

When to use Header Casing Mixed-Styles Check

Use this tool to classify ASCII header spelling as lowercase, uppercase, camel, Pascal, snake, kebab, title, or unknown, reporting distinct styles and whether more than one recognized style occurs.

Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.

How to use Header Casing Mixed-Styles Check and understand its results

  1. Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
  2. Enter headers using the field table and calculation rules, then run the tool.
  3. Read styles, distinctStyles, mixed. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
headersHeaderslist of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000Required

Supply the header strings. Ordered ASCII patterns classify lowercase, uppercase, camel, Pascal, snake, kebab and a restricted space-separated title style; unmatched names receive unknown. The result gives a style for each header and distinct recognized styles in first-seen order. Unknown entries are excluded from the mixed calculation, so an unknown-only or empty list has mixed false.

mixed = number of distinct recognized styles > 1

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
stylesStyleslist of string
distinctStylesDistinct styleslist of string
mixedMixedboolean
json
{
  "input": {
    "headers": [
      "firstName",
      "last_name",
      "zip-code"
    ]
  },
  "output": {
    "styles": [
      "camel",
      "snake",
      "kebab"
    ],
    "distinctStyles": [
      "camel",
      "snake",
      "kebab"
    ],
    "mixed": true
  }
}

Limitations and assumptions

Patterns do not support general Unicode names or every variation of a naming convention. Single lowercase/uppercase words take precedence over camel/Pascal labels. The tool detects styles without selecting a preferred convention or renaming fields.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use Mixed Header Case Conflict Check: Find header groups that collide after locale-independent lowercase conversion; preserve original spelling and report zero-based indices. For a complementary task, use Header Dedupe Suffix Counter: Make exact duplicate headers unique with _2, _3, and later suffixes, reserving all original names so generated names never steal a later header.

References

  1. Header Casing Mixed-Styles Check — tool.io

Similar or alternative tools

  • Mixed Header Case Conflict Check

    Find header groups that collide after locale-independent lowercase conversion; preserve original spelling and report zero-based indices.

  • Header Dedupe Suffix Counter

    Make exact duplicate headers unique with _2, _3, and later suffixes, reserving all original names so generated names never steal a later header.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies