TeeChartPHP
[ class tree: TeeChartPHP ] [ index: TeeChartPHP ] [ all elements ]

Source for file StringFormat.php

Documentation is available at StringFormat.php

  1. <?php
  2.  
  3. /**
  4.  * StringFormat class
  5.  *
  6.  * Description: string format utility procedures
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage misc
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16.  class StringFormat {
  17.  
  18.     public $alignment;
  19.  
  20. /*    public function format($format, $prefix, $value, $valueFormat) {
  21.         /** @todo FINISH !
  22.         return $prefix + " " + $this->Double->toString($value);
  23.     }
  24. */
  25.     public function format2($format$value1$value2{
  26.         return $format " " $this->Double->toString($value1" " +
  27.                 $this->Double->toString($value2);
  28.     }
  29.  
  30. /*    public function format2($format, $value1, $value2) {
  31.         $this->Object[] $this->obj = {$this->Integer->toString($value1), $this->Integer->toString($value2)};
  32.         return $format($format, $this->obj);
  33.     }
  34.  
  35.     public function format($formatStr, $value) {
  36.         $this->Object[] $this->args = {$value};
  37.         return $this->java->text->MessageFormat->format($formatStr, $this->args);
  38.     }
  39.  
  40.     public function format($formatStr, $args) {
  41.         return $this->java->text->MessageFormat->format($formatStr, $args);
  42.     }
  43. */
  44.     public static function split($in$ch ){
  45.         $tmpArray();
  46.  
  47.         $pos=false;
  48.  
  49.         do {
  50.             $pos strpos($in,$ch);
  51.  
  52.             if ($pos != false{
  53.                 $s substr($in,0,$pos);
  54.                 $tmp[]=$s;
  55.                 $in substr($in,0,$pos+1);
  56.             }
  57.         while ($pos != false);
  58.  
  59.             if (strlen($in0{
  60.                 $tmp[]=$in;
  61.             }
  62.  
  63.         //$result = new String[$this->tmp->size()];
  64.         return /*str_split(*/$tmp/*)*/;
  65.     }
  66. }
  67. ?>

Documentation generated on Wed, 16 Jun 2010 12:08:24 +0200 by phpDocumentor 1.4.1