(Classic ASP) Load StringTable from a StringBuilder
Demonstrates how to load a StringTable from the text contained in a Chilkat StringBuilder object.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringTable")
set strTab = Server.CreateObject("Chilkat.StringTable")
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringBuilder")
set sb = Server.CreateObject("Chilkat.StringBuilder")
success = sb.Append("This is line 1" & vbCrLf)
success = sb.Append("An empty line follows..." & vbCrLf)
success = sb.Append(vbCrLf)
success = sb.Append("This is line 4" & vbCrLf)
success = strTab.AppendFromSb(sb)
i = 0
numStrings = strTab.Count
Do While i < numStrings
Response.Write "<pre>" & Server.HTMLEncode( i & ": " & strTab.StringAt(i)) & "</pre>"
i = i + 1
Loop
%>
</body>
</html>
|