KeyData()
From Hack Wars Wiki
This is the companion to keyValue(). Returns the value of the extra data in the second slot on the line.
string keyData(string filename,string password) { string extraData=""; string filedata=readFile(filename); int p1=indexOf(filedata,password+"/",0); if(p1>-1) { int p2=indexOf(filedata,"//",p1+1); if(p2>-1) { extraData=substr(filedata,p1+strlen(password+"/"),p2); } } return extraData; } |
