Uk Postcode parsing library in Kotlin

Would like to use this post to let you know of a library that I’ve developed in Kotlin over the last few days named Ukpostkode. While working at Drover I had to deal with a lot of UK postcode handling, namely due to insurance provider integrations. For that I’ve used the ruby gem uk_postcode. So with this I’ve decided to implement the basic functionalities in Kotlin and I’m also planning to do the same in javascript (stay tuned!).

Here’s a brief snippet of it working

  For the postcode N1 5QJ   
  val postcode = UkPostkode("N1 5QJ)
  postcode.outcode = "N1"
  postcode.incode = "5QJ"
  postcode.area = "N"
  postcode.district = "1"
  postcode.sector = "5"
  postcode.unit = "QJ"
Published 15 Jun 2020

Biomedical engineer, with a keen interest in machine learning currently working as a fullstack developer at Marley Spoon. Ruby, Kotlin, Typescript and Elixir
Ricardo Trindade on Twitter