Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [int[]]$rec02 = 3,2,1,4,3,3,5,5,6,1,19,45,2,3,50
- function delimitString([string]$text, [int[]]$arrDelims)
- {
- [string]$out;
- [int]$total=0;
- foreach($d in $arrDelims)
- {
- $out += $text.substring($total,$d)+",";
- $total +=$d;
- }
- $out += $text.substring($total,$text.length-$total)+",";
- return $out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement