Using Extension Functions and Operator Overloading on SpannableStrings.
I’m a big fan of Android development - but there’s no denying that there are some rough API’s in the Android ecosystem. I spend a non-trivial amount of time scratching my head and muttering under my breath trying to figure out what incantation I need to speak before something works the way I expect it to. As a result, whenever I have the opportunity to write a wrapper around a particularly nasty Android API I jump at the opportunity. Now that Kotlin is a first class citizen in the world of Android, we can use Extension Functions and Operator Overloading to make some really beautiful API’s. Let’s walk through an example using the