Split-StringByCasingStyle¶
SYNOPSIS¶
Splits a kebab-case string into an array of words
SYNTAX¶
Split-StringByCasingStyle [-Text] <String> [[-By] <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION¶
This function splits a kebab-case string into an array of words.
EXAMPLES¶
EXAMPLE 1¶
Split-StringByCasingStyle -Text 'this-is-a-kebab-case-string' -By kebab-case
this is a kebab case string
EXAMPLE 2¶
Split-StringByCasingStyle -Text 'this_is_a_kebab_case_string' -By 'snake_case'
this is a kebab case string
EXAMPLE 3¶
Split-StringByCasingStyle -Text 'ThisIsAPascalCaseString' -By 'PascalCase'
This Is A Pascal Case String
EXAMPLE 4¶
Split-StringByCasingStyle -Text 'thisIsACamelCaseString' -By 'camelCase'
this Is A Camel Case String
EXAMPLE 5¶
Split-StringByCasingStyle -Text 'this_is_a-CamelCaseString' -By kebab-case | Split-StringByCasingStyle -By snake_case
this_is_a camelcasestring
PARAMETERS¶
-Text¶
The string to split
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-By¶
The casing style to split the string by
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.