can someone please help me out writing this code in objective C :
function extractStringFromString ($string, $start, $end) {
$startPos = strpos($string,$start);
$stringEndTagPos = strpos($string,$end,$startPos);
$stringBetween = substr($string,$startPos+strlen($start),$stringEndTagPos-$startPos-strlen($start));
if (strlen($stringBetween) != 0) {
return $stringBetween;
return true;
}
else {
return false;
}
}
what the function does is simple, takes 3 values, $string which is a text and $start and $end which the function will look for in the text ($start will be the start of the search, and once start is found, $end will be the end of the search and it will return the value)
Thanks