Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 400 and 402] [Versions 401 and 402]

(no description)

File Size: 326 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: NumberFormatter  - X-Ref

mergeComplexNumberFormatMasks(array $numbers, array $masks)   X-Ref
No description

processComplexNumberFormatMask($number, string $mask)   X-Ref

param: mixed $number

complexNumberFormatMask($number, string $mask, bool $splitOnPoint = true)   X-Ref

param: mixed $number

f2s(float $f)   X-Ref
No description

floatStringConvertScientific(string $s)   X-Ref
No description

formatStraightNumericValue($value, string $format, array $matches, bool $useThousands)   X-Ref

param: mixed $value

format($value, string $format)   X-Ref

param: mixed $value

makeString($value)   X-Ref

param: array|string $value

pregReplace(string $pattern, string $replacement, string $subject)   X-Ref
No description

padValue(string $value, string $baseFormat)   X-Ref
No description

areThousandsRequired(string &$format)   X-Ref
Find out if we need thousands separator
This is indicated by a comma enclosed by a digit placeholders: #, 0 or ?


scaleThousandsMillions(string &$format)   X-Ref
Scale thousands, millions,...
This is indicated by a number of commas after a digit placeholder: #, or 0.0,, or ?,.