Created
          September 3, 2013 05:42 
        
      - 
      
- 
        Save steppefox/6420069 to your computer and use it in GitHub Desktop. 
    strpos analog in js
  
        
  
    
      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
    
  
  
    
  | // ~strpos вхождение строки в строку | |
| var strpos = function ( haystack, needle, offset){ | |
| // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
| var i = haystack.indexOf( needle, offset ); // returns -1 | |
| return i >= 0 ? i : false; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment