Overview

Namespaces

  • Rundiz
    • Number

Classes

  • Number
  • NumberEng
  • NumberThai
  • Overview
  • Namespace
  • Class

Class NumberThai

convert number such as -10, 0.034, 0.50, 1.34, 1000000, or more to text in Thai language.

Namespace: Rundiz\Number
License: MIT.
Author: Vee W.
Uses: to convert number to text, make a call to from this class to convertNumber() method. Example: $number_thai->convertNumber('109.99');
Link: author's home page.
Located at Number/NumberThai.php
Methods summary
public string
# arabicToThaiNumber( string $input )

convert from arabic number to thai number.

convert from arabic number to thai number.

Parameters

$input
string that contain number to convert

Returns

string
return string with converted number.
public string
# convertBaht( Rundiz\Number\NumberThai::$number $num, boolean $display_net = true )

convert Thai Baht number to text.

convert Thai Baht number to text.

Parameters

$num
input the money number. negative or positive.
$display_net
display net (ถ้วน). true to display, false to not display.

Returns

string
return converted number to Thai Baht and Satang string.
public string
# convertDirectNum( Rundiz\Number\NumberThai::$number $digit )

match number to text.

match number to text.

Parameters

$digit
only one digit per request.

Returns

string
return translated number for each digit requested.
public string
# convertNumber( Rundiz\Number\NumberThai::$number $num )

convert the number (and with dot).

convert the number (and with dot).

Parameters

$num
number integer or decimal. negative or positive.

Returns

string
translated number to text in Thai language.
public string
# thaiToArabicNumber( string $input )

convert from thai number to arabic number.

convert from thai number to arabic number.

Parameters

$input
input string that contain number to convert.

Returns

string
return string with converted number
Properties summary
public array $number
# array('ศูนย์', 'หนึ่ง', 'สอง', 'สาม', 'สี่','ห้า', 'หก', 'เจ็ด', 'แปด', 'เก้า')
public array $number_scale
# array('', 'สิบ', 'ร้อย', 'พัน', 'หมื่น', 'แสน', 'ล้าน')
public array $arabic_number
# array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
public array $thai_number
# array('๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙')
API documentation generated by ApiGen