Write a function bool grep (char * strref, char * strsub); implement the following functions:
Judge whether such a substring strsub exists in a strref:
1. strsub is the starting substring of strref. Or
2. the first character of strsub is not 0-9, A-Z, any character in the A-Z.
For example:
1. strsub = "Jalan"
Strref = "Jalan Dusan"
Grep (strref1, strsub) returns true;
2. strsub = "Jalan"
Strref = "bajalan Dusan"
Grep (strref1, strsub) returns false;
3. strsub = "Jalan"
Strref = "bajalan Dusan, Jalan pemimpin"
Grep (strref, strsub) returns true;
Zbool nfsearch: grep (const zint8 * strref, const zint8 * strsub) <br/>{< br/> If (strref = NULL | strsub = NULL) {<br/> return z_false; <br/>}</P> <p> string strsrc (strref); <br/> string strdes (strsub ); </P> <p> strsrc = "" + strsrc; // pad a space charecter ahead. <br/> zint32 nfound = strsrc. find (strdes); <br/> while (nfound! = String: NPOs) {<br/> If (nfound = 0) {<br/> return z_true; <br/>}< br/> else {<br/> If (strsrc [nFound-1]> = '0 ') & (strsrc [nFound-1] <= '9') <br/> | (strsrc [nFound-1]> = 'A ') & (strsrc [nFound-1] <= 'Z') <br/> | (strsrc [nFound-1]> = 'A ') & (strsrc [nFound-1] <= 'Z') {<br/> nfound = strsrc. find (strdes, nfound + 1); <br/> continue; <br/>}< br/> else {<br/> return z_true; <br/>}</P> <p> return z_false; <br/>}</P> <p>