original_string: public static function replaceFirst($search, $replace, $subject)
      {
          if ($search == '') {
              return $subject;
          }
  
          $position = mb_strpos($subject, $search);
  
          if ($position !== false) {
              return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position + mb_strlen($search));
          }
  
          return $subject;
      }
code: public static function replaceFirst($search, $replace, $subject)
      {
          if ($search == '') {
              return $subject;
          }
  
          $position = mb_strpos($subject, $search);
  
          if ($position !== false) {
              return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position + mb_strlen($search));
          }
  
          return $subject;
      }
code_tokens: public static function replaceFirst ( $ search , $ replace , $ subject ) { if ( $ search == '' ) { return $ subject ; } $ position = mb_strpos ( $ subject , $ search ) ; if ( $ position !== false ) { return mb_substr ( $ subject , 0 , $ position ) . $ replace . mb_substr ( $ subject , $ position + mb_strlen ( $ search ) ) ; } return $ subject ; }
docstring: Replace the first occurrence of a given value in the string.
  
  @param  string  $search
  @param  string  $replace
  @param  string  $subject
  @return string
docstring_tokens: Replace the first occurrence of a given value in the string .