﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3695	"Func _SQLite_Display2DResult($aResult, $iCellWidth = 0, $bReturn = False, $sDelim_Col = """", $sDelim_Row = @CRLF)"	argumentum	Jpm	"
{{{
; #FUNCTION# ====================================================================================================================
; Author ........: piccaso (Fida Florian)
; Modified.......: jchd, argumentum (02.03.19 - added flexibility)
; ===============================================================================================================================
Func _SQLite_Display2DResult($aResult, $iCellWidth = 0, $bReturn = False, $sDelim_Col = """", $sDelim_Row = @CRLF)
	If Not IsArray($aResult) Or UBound($aResult, $UBOUND_DIMENSIONS) <> 2 Or $iCellWidth < 0 Then Return SetError(1, 0, """")
	Local $aiCellWidth
	If $iCellWidth = 0 Or $iCellWidth = Default Then
		Local $iCellWidthMax
		Dim $aiCellWidth[UBound($aResult, $UBOUND_COLUMNS)]
		For $iRow = 0 To UBound($aResult, $UBOUND_ROWS) - 1
			For $iCol = 0 To UBound($aResult, $UBOUND_COLUMNS) - 1
				$iCellWidthMax = StringLen($aResult[$iRow][$iCol])
				If $iCellWidthMax > $aiCellWidth[$iCol] Then
					$aiCellWidth[$iCol] = $iCellWidthMax
				EndIf
			Next
		Next
	EndIf
	Local $sOut = """", $iCellWidthUsed
	For $iRow = 0 To UBound($aResult, $UBOUND_ROWS) - 1
		For $iCol = 0 To UBound($aResult, $UBOUND_COLUMNS) - 1
			If $iCellWidth = 0 Then
				$iCellWidthUsed = $aiCellWidth[$iCol]
			Else
				$iCellWidthUsed = $iCellWidth
			EndIf
			$sOut &= StringFormat("" %-"" & $iCellWidthUsed & ""."" & $iCellWidthUsed & ""s "", $aResult[$iRow][$iCol]) & $sDelim_Col
		Next
		$sOut &= $sDelim_Row
		If Not $bReturn Then
			__SQLite_Print($sOut)
			$sOut = """"
		EndIf
	Next
	If $bReturn Then Return $sOut
EndFunc   ;==>_SQLite_Display2DResult
}}}

This version has the possibility to declare Column and Row delimitation.

Test code is at [https://www.autoitscript.com/forum/topic/197277-_arrayfromstring/?do=findComment&comment=1417567]

This change is not code braking.
"	Feature Request	closed	3.3.15.4	Standard UDFs		None	Completed	_SQLite_Display2DResult	
