Skip to content

Commit bf98c86

Browse files
authored
Create Get-ExoOnlineStringBytes.ps1
1 parent 4d8d0f2 commit bf98c86

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function Get-ExoOnlineStringBytes {
2+
param([string]$SizeString)
3+
4+
# This exists because various exo cmdlets like to return a human readable string like "3.322 KB (3,402 bytes)" but not the raw bytes value
5+
6+
if ($SizeString -match '\(([0-9,]+) bytes\)') {
7+
return [int]($Matches[1] -replace ',','')
8+
}
9+
10+
return 0
11+
}

0 commit comments

Comments
 (0)