This function is part of the OZOFiles PowerShell module.
Returns the inner part of a string based on a starting index and length. If the length between the start index and the end of the string is longer than Length, the string trailing the start index is returned. If Length is longer than String, the original string is returned.
Get-OZOIndexSubString
-String <String>
-Index <Int32>
-Length <Int32>
| Parameter | Description |
|---|---|
String |
The string to process. Accepts pipeline input. |
Index |
The starting character index. |
Length |
The number of characters to return. |
Get-OZOIndexSubString -String "The quick brown fox jumps over the lazy dog." -Index 8 -Length 4
ck b"The quick brown fox jumps over the lazy dog." | Get-OZOIndexSubString -Index 8 -Length 4
ck bSystem.String