<?php
/**
* Demonstraion of OString class capabilities
*/
require 'class/Ostring.php';
echo S::wrap('Start')
->append(' string.')
->capitalize()
->toLower()
->trim()
->substring(6, 5)
->pad('-',20);
$s = new OString('Test');
if ($s->endsWith('t')
&& $s->startWith('T')
&& $s->contains('es')
&& $s->indexOf('es') >= 1
&& $s->length() > 2
)
{
echo 'Ok';
}
?>
|