NPC Code:if (created) { setstring string,abbaaaabaab; setstring partstring,b; this.partcount=0; this.indexof=0; while (this.indexof!=-1) { this.indexof=indexof(#s(partstring),#e(this.indexo f,-1,#s(string)); this.partcount+=(this.indexof!=-1); } message #s(partstring) occurs #v(this.partscount) times in #s(string); }
if (created) { setstring string,abbaaaabaab; setstring partstring,b; this.partcount=0; this.indexof=0; while (this.indexof!=-1) { this.indexof=indexof(#s(partstring),#e(this.indexo f,-1,#s(string)); this.partcount+=(this.indexof!=-1); } message #s(partstring) occurs #v(this.partscount) times in #s(string); }