Str2DB + Str2App + Str2HTML

Set of functions to clean and revise cleaning of string before saving into database

Public
Tested
My Own Work
Function Str2DB(sStr)
RettT   = sStr
If RettT = "" Then RettT = " "
RettT   = Replace(RettT, vbCrLf, "")
RettT   = Replace(RettT, vbCr, "")
RettT   = Replace(RettT, vbLf, "")
RettT   = Replace(RettT, "'", "'")
RettT   = Replace(RettT, """", """)
Str2DB   = RettT
End Function
Function Str2App(sStr)
RettT   = sStr
RettT   = Replace(RettT, "", vbCrLf)
RettT   = Replace(RettT, "", vbCr)
RettT   = Replace(RettT, "", vbLf)
RettT   = Replace(RettT, "'", "'")
RettT   = Replace(RettT, """, """")
Str2App  = RettT
' Str2App  = Trim(RettT)
End Function
Function Str2HTML(sStr)
RettT   = sStr
RettT   = Replace(RettT, "", "
")
RettT   = Replace(RettT, "", "
")
RettT   = Replace(RettT, "", "
")
' RettT   = Replace(RettT, "<", "  <")
'RettT = Replace(RettT, "'", "'")
'RettT = Replace(RettT, """, """")
Str2HTML  = RettT
End Function

sStr

Views 3131 Downloads 1007

Classic ASP Texts + Strings
ANmarAmdeen
629
Revisions

v1.0