This file contains 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
javascript:(function()%7Bvar%20selector%3D'input%2Ctextarea%2Cselect'%3B%5B%5D.slice.call(document.querySelectorAll(selector)).forEach(function(value%2C%20index%2C%20list)%7Bvalue.required%3D''%3B%7D)%7D)() |
This file contains 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
<?php | |
$testHaystack = trim(file_get_contents( 'data-large.txt' )); //~4.5MB of text | |
//$testHaystack = trim(file_get_contents( 'data-small.txt')); //~1KB of text | |
//$testHaystack = 'السلام علیکم ورحمة الله وبرکاتهöLorem ipsum dolor sit amet voluptatem?öالسلام علیکم ورحمة الله وبرکاته';//Short string test | |
$validMatch = "السلام علیکم ورحمة الله وبرکاتهöLorem"; | |
$invalidMatch = "I'm not anywhere in there"; | |
$numberOfIterations = 10000; | |
//------------------[ startsWith valid ]------------------// |