I'm getting the following errors on the indicated code (<<<).
What am I doing wrong?
"Cannot find symbol ':find' on type '$.Toybox.Lang.String'."
"Cannot find symbol ':substring' on type '$.Toybox.Lang.String'."
static function splitString(str as String, delim as String) as Array<String or Null>
{
var posSep = str.find(delim);
if(posSep != null)
{
var strLeft = str.substring(0, posSep);
return [strLeft, str.substring(posSep+1, str.length())];
}
return [str, ""];
}