Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Coded by: Willian Luigi
- stock readFormat(reader[])
- {
- if (reader[0] == '\0' || strfind(reader, "/") == -1) return false;
- new
- sS = 0,
- sNextVal[15],
- sOldVal[15],
- sBarFind = 0,
- sV = 2;
- strcat(sOldVal, reader);
- sOldVal[strlen(sOldVal)] = '/';
- do
- {
- if ((sS = strfind(sOldVal, "/")) != -1)
- {
- sBarFind ++;
- if (sBarFind == 3) sV = 4;
- strmid(sNextVal, sOldVal, 0, sS);
- if (!strval(sNextVal) || strlen(sNextVal) != sV) return false;
- switch(sBarFind)
- {
- case 1: if (!(0 < strval(sNextVal) < 32)) return false;
- case 2: if (!(0 < strval(sNextVal) < 13)) return false;
- case 3: if (!(1905 < strval(sNextVal) < 2005)) return false;
- default: return false;
- }
- strmid(sOldVal, sOldVal, sS + 1, strlen(sOldVal));
- }
- } while(sS > 0);
- return sBarFind == 3;
- }
Advertisement
Add Comment
Please, Sign In to add comment