Skip to content
A client to Google Calculator in Scala using JSoup.
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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


3-clause BSD, same as Scala itself.


Glady accepted!

Something went wrong with that request. Please try again.