functions/text/Test-NotNullOrEmpty.ps1

1
2
3
4
5
6
7
8
9
function Test-NotNullOrEmpty {
    param(
        [Parameter(Mandatory = $true, Position = 0)]
        [AllowEmptyString()]
        [string]$String
    )

    $null -ne $String -and $String -ne ''
}