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

Class: STRnumbers

Source Location: /STRnumbers.php

Class Overview

Strings
   |
   --STRnumbers

This class manages STRnumbers objects.


Author(s):

Version:

  • 2.1

Methods


Child classes:

GEOlatitude
This class manages GEOcity objects.
GEOlongitude
This class manages GEOcity objects.

Inherited Variables

Inherited Methods

Class: Strings

Strings::__construct()
Construction function
Strings::console()
Console function
Strings::IsUTF8()
UTF8 detection function
Strings::QuoteStrip()
Quotes stripping function
Strings::RemoveAccent()
Accents removal function
Strings::RemoveSpaces()
Spaces removal function
Strings::stringHasNumbers()
Numbers detection function
Strings::ToUTF8()
UTF8 conversion function
Strings::ucwordsw()
Special uppercase function

Class Details

[line 37]
This class manages STRnumbers objects.

Created on 13 aug 09

CHANGES: 2.0 -> 2.1: 27 jul 09 updated: file is PEAR compatible name of class has been changed from Numbers to STRnumbers 1.0 -> 2.0: updated: phpdoc compatible in the way to generate documentation




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  2.1
license:  GNU Public License


[ Top ]


Class Methods


method Format [line 123]

string Format( int $this->value)

Format function

This function is used to format numbers. Result is returned

  1.  <?php
  2.  $oSTRnumbers        new STRnumbers();
  3.  $oSTRnumbers->value 12345;
  4.  echo $oSTRnumbers->Format();
  5.  // 12,345
  6.  ?>




Tags:

return:  formatted value
since:  version 1.0


Parameters:

int   $this->value   numeric value to be processed (required)

[ Top ]

method is_percent [line 67]

bool is_percent( [bool $integercheck = false], int $this->value)

Percentage detection function

This function is used to detect if the number is a percentage. Optionnal: could check if $this->value is an integer percentage Result is returned

  1.  <?php
  2.  $oSTRnumbers        new STRnumbers();
  3.  $oSTRnumbers->value 12.6;
  4.  echo $oSTRnumbers->is_percent();
  5.  // 1
  6.  ?>




Tags:

return:  true or false weither the value is a percentage (integer?) or not
since:  version 1.0


Parameters:

int   $this->value   numeric value to be processed (required)
bool   $integercheck   function will check if tested value is an integer

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:47 +0200 by phpDocumentor 1.4.1