fractions-to-words:将分数转换为英语单词

  • e9_844008
    了解作者
  • 3.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 00:03
    上传日期
分数到单词 将分数转换为英文单词的 php 类。 (即,“1/2”=“二分之一”,“3/16”=“十六分之三”) 用法 只需要“FractionsToWords.php”类并使用 convert() 函数。 例子: require 'FractionsToWords.php' ; echo FractionsToWords :: convert ( '1/2' ); // outputs "one half" echo FractionsToWords :: convert ( '5 1/4' ); // outputs "5 and one-fourth" 如果您发现错误或想要实施任何添加/修复,请告诉我。
fractions-to-words-master.zip
  • fractions-to-words-master
  • example.php
    1.2KB
  • README.md
    543B
  • FractionsToWords.php
    7.7KB
内容介绍
Fractions To Words ================== A php class to convert fractions to English words. (IE, "1/2" = "one-half", "3/16" = "three-sixteenths") Usage ----- Just require the "FractionsToWords.php" class and use the convert() function. Example: ```php require 'FractionsToWords.php'; echo FractionsToWords::convert('1/2'); // outputs "one half" echo FractionsToWords::convert('5 1/4'); // outputs "5 and one-fourth" ``` * * * If you see a mistakes or have any additions / fixes that you would like implemented, please let me know.
评论