I tried this function in remix and it works fine but when creating a contract it gives var keyword error is deprecated. Could you please give an example?
It is for :
var s = "www.google.com".toSlice();
var delim = ".".toSlice();
var parts = new string[](s.count(delim) + 1);
for(uint i = 0; i < parts.length; i++) {
parts[i] = s.split(delim).toString();
}
I tried this function in remix and it works fine but when creating a contract it gives var keyword error is deprecated. Could you please give an example?
It is for :
but I can not replace var correctly