public function substring ()
    {
        $start  = $this->getParameter('start');
        $length = $this->getParameter('length');

        if (empty($start))
            $start = 0;

        if (empty($length))
            $length = strlen($this->getParameter('value')) - (int)$start;

        $str = substr($this->getParameter('value'), (int)$start, (int)$length);

        return $str;
    }
public function substring ()
    {
        $start  = $this->getParameter('start');
        $length = $this->getParameter('length');

        if (empty($start))
            $start = 0;

        if (empty($length))
            $length = strlen($this->getParameter('value')) - (int)$start;

        $str = substr($this->getParameter('value'), (int)$start, (int)$length);

        return $str;
    }
public function substring ( ) { $ start = $ this -> getParameter ( 'start' ) ; $ length = $ this -> getParameter ( 'length' ) ; if ( empty ( $ start ) ) $ start = 0 ; if ( empty ( $ length ) ) $ length = strlen ( $ this -> getParameter ( 'value' ) ) - ( int ) $ start ; $ str = substr ( $ this -> getParameter ( 'value' ) , ( int ) $ start , ( int ) $ length ) ; return $ str ; }
Returns a substring from param 'value'. Returns the 1st letter if only 'value' is specified

Expected Params:
value  string  the string to operate upon
start  integer (optional) the starting point for our substring, default 0
length integer (optional) the length of the substring. default 1

@return string
Returns a substring from param value . Returns the 1st letter if only value is specified