/** 
  *
  * @param string $userAgent
  * @return string
  */
 function lookForMatchingUserAgent($userAgent)
 {
     $tolerance = 0;
     if (WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "Apple")) {
         $tolerance = WURFL_Handlers_Utils::ordinalIndexOf($userAgent, " ", 3);
     } else {
         $tolerance = WURFL_Handlers_Utils::firstSemiColonOrLength($userAgent);
     }
     return WURFL_Handlers_Utils::risMatch(array_keys($this->userAgentsWithDeviceID), $userAgent, $tolerance);
 }