Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A client to Google Calculator in Scala using JSoup.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 README.md
Octocat-spinner-32 build.sbt
README.md

GoogleCalculator for Scala

Build Status

This is just a very simple wrapper around Google Calculator, similar to what WWW::Google::Calculator does for Perl.

Using it

scala> import me.elrod.GoogleCalculator._
import me.elrod.GoogleCalculator._

scala> GoogleCalculator.calculate("2 + 2")
res0: String = 2 + 2 = 4

scala> GoogleCalculator.calculate("3 GB to MB")
res1: String = 3 gigabytes = 3072 megabytes

scala> GoogleCalculator.calculate("pi")
res2: String = pi = 3.14159265

License

3-clause BSD, same as Scala itself.

Contributions

Glady accepted!

Something went wrong with that request. Please try again.