| 
<?php
require ("string.class.php");
 
 $s = new String("Hello World !");
 
 echo $s;
 
 echo "<br>";
 
 echo $s->toUpper();
 
 echo "<br>";
 
 echo $s->toLower();
 
 echo "<br>";
 
 echo $s->substr(0, 5)->length();
 
 echo "<br>";
 
 $h = new String("hello");
 
 if ($s->substr(0, 5)->toLower() == $h) {
 echo "it's hello";
 }
 
 echo "<br>";
 
 if ($h->not("world")) {
 echo "it's not world!";
 }
 
 echo "<br>";
 
 $x = $s->concat(" yes ", $h);
 
 echo $x;
 
 echo "<br>";
 
 echo ($x->toLower()->eq("hello world ! yes hello") ? "it's full lower!" : "not full lower");
 ?>
 |