diff --git a/Version Control.accda.src/modules/clsDbTableData.cls b/Version Control.accda.src/modules/clsDbTableData.cls index c16c1f8f..480ea475 100644 --- a/Version Control.accda.src/modules/clsDbTableData.cls +++ b/Version Control.accda.src/modules/clsDbTableData.cls @@ -70,7 +70,9 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String) Application.ExportXML acExportTable, m_Table.Name, strFile End If Perf.OperationEnd - SanitizeXML strFile, False + With New clsSanitize + .SanitizeXML strFile, False + End With End Select End If Next intFormat diff --git a/Version Control.accda.src/modules/clsDbTableDef.cls b/Version Control.accda.src/modules/clsDbTableDef.cls index cbb183a1..9370b4e2 100644 --- a/Version Control.accda.src/modules/clsDbTableDef.cls +++ b/Version Control.accda.src/modules/clsDbTableDef.cls @@ -59,7 +59,9 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String) Perf.OperationEnd ' Rewrite sanitized XML as formatted UTF-8 content - strHash = SanitizeXML(strFile, True) + With New clsSanitize + strHash = .SanitizeXML(strFile, True) + End With Else ' Linked table - Save as JSON diff --git a/Version Control.accda.src/modules/clsSanitize.cls b/Version Control.accda.src/modules/clsSanitize.cls index 4cfb4d1c..88464b8c 100644 --- a/Version Control.accda.src/modules/clsSanitize.cls +++ b/Version Control.accda.src/modules/clsSanitize.cls @@ -732,31 +732,6 @@ Public Function TrimTabs(strText As String) As String End Function -'--------------------------------------------------------------------------------------- -' Procedure : StartsWith -' Author : Adam Waller -' Date : 11/5/2020 -' Purpose : See if a string begins with a specified string. -'--------------------------------------------------------------------------------------- -' -Public Function StartsWith(strText As String, strStartsWith As String, Optional Compare As VbCompareMethod = vbBinaryCompare) As Boolean - StartsWith = (InStr(1, strText, strStartsWith, Compare) = 1) -End Function - - -'--------------------------------------------------------------------------------------- -' Procedure : EndsWith -' Author : Adam Waller -' Date : 4/29/2021 -' Purpose : See if a string ends with a specified string. -'--------------------------------------------------------------------------------------- -' -Public Function EndsWith(strText As String, strEndsWith As String, Optional Compare As VbCompareMethod = vbBinaryCompare) As Boolean - EndsWith = (StrComp(Right$(strText, Len(strEndsWith)), strEndsWith, Compare) = 0) - 'EndsWith = (InStr(1, strText, strEndsWith, Compare) = len(strtext len(strendswith) 1) -End Function - - '--------------------------------------------------------------------------------------- ' Procedure : GetIndent ' Author : Adam Waller diff --git a/Version Control.accda.src/modules/modFunctions.bas b/Version Control.accda.src/modules/modFunctions.bas index ffb07d17..2f20d2b6 100644 --- a/Version Control.accda.src/modules/modFunctions.bas +++ b/Version Control.accda.src/modules/modFunctions.bas @@ -877,6 +877,31 @@ Public Function DeDupString(strText As String, strDuplicated As String) As Strin End Function +'--------------------------------------------------------------------------------------- +' Procedure : StartsWith +' Author : Adam Waller +' Date : 11/5/2020 +' Purpose : See if a string begins with a specified string. +'--------------------------------------------------------------------------------------- +' +Public Function StartsWith(strText As String, strStartsWith As String, Optional Compare As VbCompareMethod = vbBinaryCompare) As Boolean + StartsWith = (InStr(1, strText, strStartsWith, Compare) = 1) +End Function + + +'--------------------------------------------------------------------------------------- +' Procedure : EndsWith +' Author : Adam Waller +' Date : 4/29/2021 +' Purpose : See if a string ends with a specified string. +'--------------------------------------------------------------------------------------- +' +Public Function EndsWith(strText As String, strEndsWith As String, Optional Compare As VbCompareMethod = vbBinaryCompare) As Boolean + EndsWith = (StrComp(Right$(strText, Len(strEndsWith)), strEndsWith, Compare) = 0) + 'EndsWith = (InStr(1, strText, strEndsWith, Compare) = len(strtext len(strendswith) 1) +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : SwapExtension ' Author : Adam Waller