Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix rmesc #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions MSAccess-VCS/VCS_String.bas
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ Public Function VCS_PadRight(ByVal Value As String, ByVal Count As Integer) As S
End Function

' Remove escape characters
Public Function VCS_RmEsc(Value As String) As String
Public Function VCS_RmEsc(Value)
Dim i As Integer
Dim nextChar As String

If VarType(Value) <> vbString Then
VCS_RmEsc = Value
Exit Function
End If

i = InStr(1, Value, "\")
Do Until i = 0
nextChar = Mid(Value, i + 1, 1)
Expand All @@ -57,9 +62,10 @@ Public Function VCS_RmEsc(Value As String) As String
Value = left(Value, i - 1) & "\" & Mid(Value, i + 2)
Case "n"
Value = left(Value, i - 1) & vbCrLf & Mid(Value, i + 2)
Case "r"
Case "t"
Value = left(Value, i - 1) & vbTab & Mid(Value, i + 2)
End Select
i = InStr(i + 1, Value, "\")
Loop
End Function
VCS_RmEsc = Value
End Function