UnitTest( xstring.asp )

Output

Nagao, Fabio
Nagao, Zendhi {2}
Hello World
Hello World
hello-world
helloWorld
HelloWorld
HELLO WORLD
hello world
Marcio has some strong skills in programming
1 has some strong skills in programming
False has some strong skills in programming
Do you know foo bar?

Sources

/axe-ut/xstring.unit.test.asp

<!--#include virtual="/lib/unit-tests.asp"-->
<!--#include virtual="/lib/axe/classes/unittest.asp"-->
<!--#include virtual="/lib/axe/classes/Utilities/xstring.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en">
	<head>
		<title>AXE - Unit Test - Template</title>
		<!--// meta tags //-->
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<!--// link tags //-->
		<link rel="stylesheet" type="text/css" media="screen" href="/lib/unit-tests.css" />
	</head>
	<body>
		<div id="container">
			<div id="container-hd">
				<h1>UnitTest( xstring.asp )</h1>
			</div>
			<div id="container-bd">
 
<h2>Output</h2>
<div class="code"><pre><%
 
dim S : set S = new XString
Response.write( S(null).substitute(null) )
Response.write( S(null).substitute(array()) )
Response.write( S("{0}, {1}").substitute(array("Nagao", "Fabio", "Zendhi")) & vbNewline )
Response.write( S("{0}, {1} {2}").substitute(array("Nagao", "Zendhi")) & vbNewline )
Response.write( S("Hello World").substitute(null) & vbNewline )
Response.write( S("Hello World").substitute(array("nagaozen")) & vbNewline )
Response.write( S("Hello World").hyphenate(, null) & vbNewline )
Response.write( S("hello world").camelize(, null) & vbNewline )
Response.write( S("hello world").propercase(, null) & vbNewline )
Response.write( S("hello world").toUpperCase(null) & vbNewline )
Response.write( S("hello world").toLowerCase(null) & vbNewline )
Response.write( S("{0} has some strong skills in programming").substitute(array("Marcio")) & vbNewline )
Response.write( S("{0} has some strong skills in programming").substitute(array(1)) & vbNewline )
Response.write( S("{0} has some strong skills in programming").substitute(false) & vbNewline )
 
Response.write( S("Do you know {0} {1}?").[](array("foo", "bar")) )
 
set S = nothing
 
%></pre></div>
 
			</div>
			<div id="container-ft">
				<h2>Sources</h2>
				<h3><%= Request.ServerVariables("SCRIPT_NAME") %></h3>
				<div class="code"><%= geshify( loadTextFile( Server.mapPath( Request.ServerVariables("SCRIPT_NAME") ) ), "asp" ) %></div>
			</div>
		</div>
		<!--// javascript tags //-->
	</body>
</html>