B4X Requires Chilkat v11.1.0+
B4X
HTML Entity Encode and Decode in StringBuilder
Demonstrates HTML encoding and decoding the contents of a StringBuilder.Chilkat B4X Downloads
Dim sb As ChilkatStringBuilder
sb.Initialize
Dim s As String = "< é ü ç Ω Hello & World ✓ >"
sb.Append(s)
sb.Encode("html", "utf-8")
Log(sb.GetAsString)
' Output:
' < é ü ç Ω Hello & World ✓ >
' To decode:
sb.Decode("html", "utf-8")
Log(sb.GetAsString)
' Output:
' < é ü ç Ω Hello & World ✓ >