#include <Array.au3>
Local $aArray[] = [" ", " This ", " ", "is ", " my test ", " "]
$aArray1 = _Deye_ArrayDelEmptyRows($aArray, Chr(32))
_ArrayDisplay($aArray1) ; <<<--- trimed all spaces
$aArray2 = _Deye_ArrayDelEmptyRows($aArray, Chr(34))
_ArrayDisplay($aArray2) ; <<<--- no empty spaces removed
Func _Deye_ArrayDelEmptyRows(ByRef $aArray, $sDelim = Chr(32), $bUBound = False)
Local $iArrayColumns = UBound($aArray, 2)
If $iArrayColumns >= 1 Then
Local $iCopyTo_Index = 0
For $i = 0 To UBound($aArray) - 1
For $j = 0 To $iArrayColumns - 1
;~ If StringStripWS($aArray[$i][$j], 8) Then ExitLoop
If $aArray[$i][$j] Then ExitLoop
If $j = $iArrayColumns - 1 Then ContinueLoop 2
Next
If $i <> $iCopyTo_Index Then
For $j = 0 To $iArrayColumns - 1
$aArray[$iCopyTo_Index][$j] = $aArray[$i][$j]
Next
EndIf
$iCopyTo_Index += 1
Next
If UBound($aArray) > $iCopyTo_Index Then ReDim $aArray[$iCopyTo_Index][$iArrayColumns]
If $bUBound Then _ArrayInsert($aArray, 0, UBound($aArray))
Return ($aArray)
Else
Return StringSplit(StringTrimLeft(StringRegExpReplace(StringRegExpReplace($sDelim & _ArrayToString($aArray, $sDelim), $sDelim & "[" & $sDelim & "]*[" & $sDelim & "]", $sDelim), $sDelim & "$", ""), 1), $sDelim, $bUBound ? "" : 3)
EndIf
EndFunc
How is this a solve for OP's question?