Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=180300008

Knowledge Base Recursion Remove Multiple Space 2

Knowledge Base: Examples of Recursion

Recursion: each item of an expression is generated by repeating a particular definition recursively.

Recursively Removal of Multiple Spaces by Using VBScript

Example of Recursively Removal of Multiple Spaces by Using VBScript.last updated 01Sep2017

!DOCTYPE html>
ASP VbScript Command:
<script runat="server" language="VBScript">
Dim strs
strs="<!DOCTYPE html>"&vbCrLf&_
"<html lang=""en"">"
Response.Write prtwoctrl("Sample Display: """&strs&"""")
Response.Write prtwoctrl("Sample Storage: """&replace(strs," ","%20")&"""")
Call prtwoctrl("Start Removal of Multiple Spaces")
Call rmv_gap(strs)
Call prtwoctrl("End of Recursion")

Function rmv_gap(blk_str)
Dim a,b,c,d
a= split(blk_str,"<",2)
Select Case ubound(a)
Case 1, "1"
b=split(a(1),">",2)
c=split(b(0)," ",2)
Select Case lcase(c(0))
Case "!doctype"
rmv_gap="<"&c(0)&">"
End Select
Case Else
rmv_gap=a(0)
End Select
Call prtwoctrl(""""&rmv_gap&"""")
End Function

Function prtwoctrl(blk_str)
Dim temp_blk_str
temp_blk_str=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"<","&lt;"),"""","&quot;"),">","&gt;"),"%20"," ")&"<br />"
Response.Write temp_blk_str
End Function

Function rmvspace(blk_str)
Dim a,b,c
a= split(blk_str," ",2)
If ubound(a)=1  Then
    c=ltrim(a(1))
    Select Case c
        Case ""," ",null
            b= a(0)&" "
        Case Else
            b= a(0)&" "& rmvspace(c)
    End Select
Else
   b=a(0)
End IF
rmvspace=b
Response.Write  "&quot;"&b&"&quot;"&"<br />"
End Function
</script>
HTML Web Page In-line Output:
Sample Display: "<!DOCTYPE html> <html lang="en">"
Sample Storage: "<!DOCTYPE html> <html lang="en">"
Start Removal of Multiple Spaces
"<!DOCTYPE>"
End of Recursion

Link:http://output.to/sideway/default.asp?qno=180300802

Windows Media Player

Windows Media Player

Windows Media Player is a utility used for playing audio, video and viewing images.

The graphic interface of Windows Media Player from microsoft.com:

image

Site of win

Links of Windows Media Player

Link of Related Download

Sideway BICK Blog

08/03


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013