V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
doctorlai
V2EX  ›  分享创造

把整数转换成英文

  •  
  •   doctorlai ·
    doctorlai · 2017-05-07 10:50:38 +08:00 · 2508 次点击
    这是一个创建于 2544 天前的主题,其中的信息可能已经有所发展或是发生改变。
    10 条回复    2017-05-09 05:27:54 +08:00
    wujunze
        1
    wujunze  
       2017-05-07 15:02:48 +08:00
    不错 感谢分享
    sunjourney
        2
    sunjourney  
       2017-05-07 15:11:00 +08:00
    感谢分享!
    taurenshaman
        3
    taurenshaman  
       2017-05-08 10:53:47 +08:00
    感谢分享!用 C#改了一下,适配 long (– 9,223,372,036,854,775,808 到 9,223,372,036,854,775,807 )和 ulong ( 0 到 18,446,744,073,709,551,615 ):
    https://github.com/taurenshaman/nodes/tree/master/Azure.Functions/nodes-math/Arabic-Numerals-To-English-Words
    taurenshaman
        4
    taurenshaman  
       2017-05-08 10:55:03 +08:00
    吐槽一下 short scale 和 long scale: https://en.wikipedia.org/wiki/Names_of_large_numbers
    QAPTEAWH
        5
    QAPTEAWH  
       2017-05-08 15:31:08 +08:00
    话说老外经常有神奇的念数字方法,比方说 1200 说成 twelve hundreds...
    doctorlai
        6
    doctorlai  
    OP
       2017-05-08 16:28:52 +08:00
    @QAPTEAWH 是的。 或者 2020 练成 twenty twenty. 我感觉在说电话号码的时候这种读法多一些。
    @taurenshaman 牛, 是的, 我看了 wiki 后才发现现在欧洲除了英国外 其它地方 million 是 9 个 0 不是 6 个 0
    doctorlai
        7
    doctorlai  
    OP
       2017-05-08 16:30:31 +08:00   ❤️ 1
    @taurenshaman 另:给你 github 上提了个 PR
    taurenshaman
        8
    taurenshaman  
       2017-05-08 17:54:53 +08:00
    @doctorlai thank you~~
    唉,第一个 PR 啊。。。。。
    doctorlai
        9
    doctorlai  
    OP
       2017-05-08 18:09:41 +08:00
    @taurenshaman 哈哈,是我的第二个。
    jedihy
        10
    jedihy  
       2017-05-09 05:27:54 +08:00
    刷题刷的不错啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1092 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 19:07 · PVG 03:07 · LAX 12:07 · JFK 15:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.