StrExpand Function:

The StrExpand function expands a string by inserting spaces between each character and three spaces if it encounters a space in the string. There are two required arguments: string and usenbsp. String is the string to expand and usenbsp is a boolean value (true, false) indicating whether the spaces should be HTML nonbreaking spaces ( ) or plain spaces " ".

Syntax:
string = StrExpand(string, usenbsp)
Example Usage:
<PRE>
<%  =  StrExpand("WHERE ARE MY MATCHES?", False)  %>
</PRE>

<%  =  StrExpand("WHERE ARE MY MATCHES?", True)  %>
The above values return:
W H E R E   A R E   M Y   M A T C H E S ? 
W H E R E   A R E   M Y   M A T C H E S ? 
ASP Source Code:
<%
Private Function StrExpand(byVal string, byVal usenbsp)
	Dim Tmp, i
	For i = 1 to Len( string )
		Select Case CBool( usenbsp )
			Case False
				If Mid( string, i, 1 ) = " " Then
					Tmp = Tmp & "  "
				Else
					Tmp = Tmp & Mid( string, i, 1 ) & " "
				End If
			Case True
				If Mid( string, i, 1 ) = " " Then
					Tmp = Tmp & "  "
				Else
					Tmp = Tmp & Mid( string, i, 1 ) & " "
				End If
		End Select
	Next
	StrExpand = Tmp
End Function
%>