Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. [int[]]$rec02 = 3,2,1,4,3,3,5,5,6,1,19,45,2,3,50
  2.  
  3. function delimitString([string]$text, [int[]]$arrDelims)
  4. {
  5. [string]$out;
  6. [int]$total=0;
  7. foreach($d in $arrDelims)
  8. {
  9. $out += $text.substring($total,$d)+",";
  10. $total +=$d;
  11. }
  12.  
  13. $out += $text.substring($total,$text.length-$total)+",";
  14. return $out;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement