Skip to content
/ KNSHelper Public

Helper Module for Powershell. Groups some generic functions

License

Notifications You must be signed in to change notification settings

kns7/KNSHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KNSHelper

Provide some generic helpers functions for Powershell.

ConvertTo-Slug

Synopsis

Slugify a String in entry

Syntax

ConvertTo-Slug [-Text] <String> [[-Delimiter] <String>] [-CapitalizeFirstLetter] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
Text String. Text to slugify true true (ByValue)
Delimiter String. Optional, the delimiter used. If omitted, "-" will be used false false -
CapitalizeFirstLetter Switch. If the switch is set, it will capitalize the first letter of each word in the "Text" string. false false False

Examples

EXAMPLE 1

ConvertTo-Slug "That's all folks!"

Will return "thats-all-folks"

EXAMPLE 2

ConvertTo-Slug "That's all Folks!" -Delimiter "_"

Will return "thats_all_folks"

EXAMPLE 3

ConvertTo-Slug "That's all Folks!" -Delimiter "" -CapitalizeFirstLetter

Will return "ThatsAllFolks"

About

Helper Module for Powershell. Groups some generic functions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published