Kode fungsi css compress opsi light
Option ExplicitCara penggunaan fungsi css compress opsi light
Public Function CSSCompressLight(sText As String) As String
Dim sTextCSS As String
Dim arrCSS() As String
sTextCSS = sText
sTextCSS = Replace(sTextCSS, " ", "")
arrCSS = Split(sTextCSS, vbCrLf)
sTextCSS = ""
For i = LBound(arrCSS) To UBound(arrCSS)
If arrCSS(i) <> "" Then
sTextCSS = sTextCSS & arrCSS(i) & vbCrLf
End If
Next
CSSCompressLight = sTextCSS
End Function
Private Sub Command1_Click()
Text1.Text = CSSCompress(Text1.Text)
End Sub