11# CasingStyle
22
3- CasingStyle is a PowerShell module for working with text casing styles.
3+ CasingStyle is a PowerShell module for detecting, converting, and splitting text casing styles. It is handy for text transformations,
4+ standardizing variable names, and keeping formatting consistent across scripts.
45
56## Installation
67
@@ -11,6 +12,44 @@ Install-PSResource -Name CasingStyle
1112Import-Module -Name CasingStyle
1213```
1314
15+ ## Usage
16+
17+ ### Example: Convert a string to a different casing style
18+
19+ ``` powershell
20+ 'thisIsCamelCase' | ConvertTo-CasingStyle -To 'snake_case'
21+ # Output: this_is_camel_case
22+
23+ 'thisIsCamelCase' | ConvertTo-CasingStyle -To 'UPPER_SNAKE_CASE'
24+ # Output: THIS_IS_CAMEL_CASE
25+
26+ 'thisIsCamelCase' | ConvertTo-CasingStyle -To 'kebab-case'
27+ # Output: this-is-camel-case
28+ ```
29+
30+ ### Example: Detect the casing style of a string
31+
32+ ``` powershell
33+ 'testTestTest' | Get-CasingStyle
34+ # Output: camelCase
35+
36+ 'TestTestTest' | Get-CasingStyle
37+ # Output: PascalCase
38+ ```
39+
40+ ### Example: Split a string based on casing style
41+
42+ ``` powershell
43+ Split-CasingStyle -Text 'this-is-a-kebab-case-string' -By 'kebab-case'
44+ # Output:
45+ # this
46+ # is
47+ # a
48+ # kebab
49+ # case
50+ # string
51+ ```
52+
1453## Documentation
1554
1655Documentation is published at [ psmodule.io/CasingStyle] ( https://psmodule.io/CasingStyle/ ) .
@@ -21,7 +60,3 @@ Use PowerShell help and command discovery for module details:
2160Get-Command -Module CasingStyle
2261Get-Help Get-CasingStyle -Examples
2362```
24-
25- ## Contributing
26-
27- Issues and pull requests are welcome. Please use the repository issue tracker to report bugs, request features, or discuss improvements.
0 commit comments