[AutoIt]Remove all empty elements in an array 11-26-2011, 07:38 AM
#1
Code:
; Removes Elemets that contain only whitespace characters and returns the new array.
; The count of the return is at $aRet[0].
Func _ArrayRemoveBlanks($aID)
Local $sTmp = ''
For $i = 0 to Ubound($aID) -1
If StringRegExpReplace($aID[$i], "\s", "") Then $sTmp &= $aID[$i] & Chr(0)
Next
Return StringSplit(StringTrimRight($sTmp, 1), Chr(0))
EndFuncThis code is not mine, credits go completely to smashly

I thought i share this cause its awesome and doesn't use _ArrayDelete() like some other func I saw the other day...
(This post was last modified: 11-26-2011, 07:39 AM by Skullmeat.)
Pierce the life fibers with your drill.



![[+]](https://sinister.li/images/modern/collapse_collapsed.png)