Skip to main content
Version: 1.3.0

Pascal Case

Text Processing String Manipulation

Synopsis

Converts strings to PascalCase format.

Schema

- pascalcase:
field: <ident>
target_field: <string>
fields: <array>
exclude: <array>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>

Configuration

The following fields are used to define the processor:

FieldRequiredDefaultDescription
fieldN-Single field to convert to PascalCase
target_fieldNSame as fieldTarget field to store PascalCase result
fieldsN-Array of fields to convert to PascalCase
excludeN-Array of fields to exclude from conversion
descriptionN-Explanatory note
ifN-Condition to run
ignore_failureNfalseContinue processing if conversion fails
ignore_missingNfalseSkip processing if referenced field doesn't exist
on_failureN-See Handling Failures
on_successN-See Handling Success
tagN-Identifier

Details

Converts string values to PascalCase format by removing spaces, hyphens, underscores, and other separators, then capitalizing the first letter of each word including the first word. This format is commonly used in programming for class names, type names, and other identifiers.

PascalCase is similar to camelCase but capitalizes the very first letter as well, making it suitable for naming conventions in many programming languages.

note

PascalCase format capitalizes the first letter of every word including the first, resulting in format like "FirstName", "UserAccountName", or "DataProcessingComplete". This differs from camelCase where the first letter remains lowercase.

The processor handles various input formats and converts them to the standard PascalCase naming convention used in object-oriented programming.

warning

If the field contains non-string values, the processor will attempt to convert them to strings before applying PascalCase conversion. Complex objects or arrays may produce unexpected results.

Examples

Basic Conversion

Converting snake_case to PascalCase...

{
"class_name": "user_account_manager"
}
- pascalcase:
field: class_name
target_field: pascal_name

converts to PascalCase:

{
"class_name": "user_account_manager",
"pascal_name": "UserAccountManager"
}

Type Name Generation

Creating type names from descriptions...

{
"component_type": "data processing pipeline"
}
- pascalcase:
field: component_type
target_field: type_name

generates programming identifier:

{
"component_type": "data processing pipeline",
"type_name": "DataProcessingPipeline"
}

Mixed Format Input

Normalizing mixed separators to PascalCase...

{
"interface_name": "api-response_handler with events"
}
- pascalcase:
field: interface_name

standardizes to PascalCase:

{
"interface_name": "ApiResponseHandlerWithEvents"
}

Multiple Fields

Converting multiple fields to PascalCase...

{
"model_name": "user_profile",
"service_name": "authentication_service",
"controller_name": "api_controller"
}
- pascalcase:
fields: ["model_name", "service_name", "controller_name"]

processes all specified fields:

{
"model_name": "UserProfile",
"service_name": "AuthenticationService",
"controller_name": "ApiController"
}

Namespace Generation

Creating namespace identifiers...

{
"module_path": "data.stream.processors"
}
- pascalcase:
field: module_path
target_field: namespace

generates namespace identifier:

{
"module_path": "data.stream.processors",
"namespace": "DataStreamProcessors"
}