8000 GitHub - paul-english/scala-overpunch: Decode/encode the overpunch format
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

paul-english/scala-overpunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decode (and encode if you really want to) overpunch formatted numbers into decimals. This library is a simple port of the logic from the python overpunch library.

Examples

import com.github.log0ymxm.Overpunch

Overpunch.decode("10}", decimals=0) == BigDecimal("-100")
Overpunch.decode("45A", decimals=0) == BigDecimal("451")
Overpunch.decode("1000}") == BigDecimal("-100.00")

TODO

  • I ported over the original python tests, and they all pass. I've added some rigorous scalacheck tests, but they currently don't pass. The library is probably usable, scalacheck seems to be just hitting the less likely edge cases.

About

Decode/encode the overpunch format

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0