This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Helper_Number

Direct known subclasses

NumberHelper

Methods summary

public number
# flexround( string $value )

Rounds the value only out to its most significant digit.

protected Zend_Locale
# getZendLocale( )

Returns the Zend_Locale instance for the current locale.

public boolean
# isNumber( $string )

Checks if a given string is valid representation of a number in the current locale.

public boolean
# isInteger( $string )

Checks if a given string is valid representation of an integer in the current locale.

public string
# format( number $number, integer|null $precision = null )

Format a number with grouped thousands and localized decimal point/thousands separator.

public null|number
# unformat( string $string, boolean $trim = true, integer|null $precision = null )

Parses a localized number representation and returns the number (or null if $string is not a valid number representation).

public string|mixed
# formatSize( number $size, string $forceUnit = '' )

Formats a size (measured in bytes, KB, MB, ...).