string in string 1.0

Operating systemsOS :
Program licensingScript Licensing : GPL - GNU Public License
CreatedCreated : Aug 30, 2006
Size downloadDownloads : 1
Program licensing
Thank you for voting...

<i>String in string - php snippet</i> <br /> // ...

string in string by fundisom - php_snippet
// InStr function
// checks for an occurance of a string
// within another string
function InStr($String, $Find, $CaseSensitive = false) {
$i=0;
while (strlen($String)>=$i) {
unset($substring);
if ($CaseSensitive) {
$Find=strtolower($Find);
$String=strtolower($String);
}
$substring=substr($String, $i, strlen($Find));
if ($substring==$Find) return true;
$i ;
}
return false;
}
// A similar function, returns the number of occurances
function InStrCount($String, $Find, $CaseSensitive = false) {
$i=0;
$x=0;
while (strlen($String)>=$i) {
unset($substring);
if ($CaseSensitive) {
$Find=strtolower($Find);
$String=strtolower($String);
}
$substring=substr($String, $i, strlen($Find));
if ($substring==$Find) $x ;
$i ;
}
return $x;
}
// Another similar function, this will return the position of
// the string. returns -1 if the string does not exist
function InStrPos($String, $Find, $CaseSensitive = false) {
$i=0;
while (strlen($String)>=$i) {
unset($substring);
if ($CaseSensitive) {
$Find=strtolower($Find);
$String=strtolower($String);
}
$substring=substr($String, $i, strlen($Find));
if ($substring==$Find) return $i;
$i ;
}
return -1;
}
?

string in string 1.0 scripting tags: strlenstringi, string string, snippet, return, php snippet, false, function, php script, substringfind, unsetsubstring. What is new in string in string 1.0 software script? - Unable to find string in string 1.0 news. What is improvements are expecting? Newly-made string in string 1.1 will be downloaded from here. You may download directly. Please write the reviews of the string in string. License limitations are unspecified.