Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,29 +0,0 @@
|
|||
function Split-String ([string]$String, [char]$Separator, [char]$Escape)
|
||||
{
|
||||
if ($String -notmatch "\$Separator|\$Escape") {return $String}
|
||||
|
||||
[bool]$escaping = $false
|
||||
[string]$output = ""
|
||||
|
||||
for ($i = 0; $i -lt $String.Length; $i++)
|
||||
{
|
||||
[char]$character = $String.Substring($i,1)
|
||||
|
||||
if ($escaping)
|
||||
{
|
||||
$output += $character
|
||||
$escaping = $false
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ($character)
|
||||
{
|
||||
{$_ -eq $Separator} {$output; $output = ""; break}
|
||||
{$_ -eq $Escape} {$escaping = $true ; break}
|
||||
Default {$output += $character}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($String[-1] -eq $Separator) {[String]::Empty}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Split-String "one^|uno||three^^^^|four^^^|^cuatro|" -Separator "|" -Escape "^" | ForEach-Object `
|
||||
-Begin {$n = 0} `
|
||||
-Process {$n+= 1; "{0}: {1}" -f $n, $_}
|
||||
Loading…
Add table
Add a link
Reference in a new issue