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