mplacona
06/21/2018, 1:35 PMwith
nd am struggling to even get it working. I don't think I understand exactly how this works. So windwering if anyone can help me out here. I have:
class StringParser(string: String){
private var stringToClean = string
fun removeHTMLTags() = Regex("<[^>]*>").replace(stringToClean, "")
fun removeSpecialCharacters() = Regex("[^A-Za-z0-9 ]").replace(stringToClean, "")
}
Now, I should be able to instantiate this class with a string, and call the methods on it to return a clean string right?