<?php
include_once('StringBuilder.php');
$stringBuilder = StringBuilder::newInstance();
$stringBuilder->append("Text 1 2 3 ");
$stringBuilder->append("Some more text here and here and over there");
echo "\n This StringBuilder has {$stringBuilder->length()} letters \n ";
echo " Data from this StringBuilder : \n";
echo "<pre> {$stringBuilder->toString()} </pre>";
echo "\n Cleaning data : \n"; $stringBuilder->__clear();
echo "\n creating new instance \n ";
$newSB = null;
$newSB = StringBuilder::newInstance();
|