Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of jarosek  >  OString  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example (dummy) usage
Class: OString
Manipulate text strings
Author: By
Last change: N/A
Date: 2010-08-10 14:11
Size: 470 bytes
 

Contents

Class file image Download
<?php
/**
 * Demonstraion of OString class capabilities
 */
require 'class/Ostring.php';

echo 
S::wrap('Start')
    ->
append(' string.')
        ->
capitalize()
        ->
toLower()
        ->
trim()
        ->
substring(65)
        ->
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';
}
?>