Last active
          August 29, 2015 14:05 
        
      - 
      
- 
        Save hcliff/e1efb6e3a2414c303068 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function finder(filename, string){ | |
| for(var ifilename = 0, istring = 0;ifilename<filename.length;ifilename++){ | |
| var cstring = string[istring], | |
| cfilename = filename[ifilename]; | |
| // console.log(i, cstring, cfilename); | |
| if(cstring == cfilename){ | |
| istring++; | |
| if(istring == string.length) | |
| return true; | |
| } | |
| } | |
| return false; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment