Split-CasingStyle¶
SYNOPSIS¶
Splits a string based on one or more casing styles.
SYNTAX¶
__AllParameterSets¶
Split-CasingStyle [-Text] <string> [[-By] <string[]>] [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION¶
This function takes a string and an array of casing styles (via the -By parameter) and splits the string into its component words. It does this iteratively, applying each split to every token produced by the previous one.
EXAMPLES¶
EXAMPLE 1¶
Split-CasingStyle -Text 'this-is-a-kebab-case-string' -By kebab-case
this is a kebab case string
EXAMPLE 2¶
Split-CasingStyle -Text 'this_is_a_kebab_case_string' -By 'snake_case'
this is a kebab case string
EXAMPLE 3¶
Split-CasingStyle -Text 'ThisIsAPascalCaseString' -By 'PascalCase'
This Is A Pascal Case String
EXAMPLE 4¶
Split-CasingStyle -Text 'thisIsACamelCaseString' -By 'camelCase'
this Is A Camel Case String
EXAMPLE 5¶
Split-CasingStyle -Text 'this_is_a-CamelCaseString' -By kebab-case | Split-CasingStyle -By snake_case
this_is_a camelcasestring
EXAMPLE 6¶
'this_is_a-PascalString' | Split-CasingStyle -By 'snake_case','kebab-case','PascalCase'
PARAMETERS¶
-By¶
The casing style(s) to split the string by.
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Text¶
The string to split
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
System.String¶
{{ Fill in the Description }}
OUTPUTS¶
[string[]] - An array of strings¶
{{ Fill in the Description }}