Get a formatted string encoding the differing members.

@param $object
@param $object2
@param $formatString
@param $separator
426982
public static function getDifferingMembersFormattedString($object1, $object2, $formatString, $separator, $displayMemberKeys = array(), $recursive = false) {

        // Get the differing members
        $differingMembers = ObjectUtils::getDifferingMembers($object1, $object2, array_keys($displayMemberKeys), $recursive);

        // Loop through each differing member
        $elements = array();
        foreach ($differingMembers as $member => $data) {
            $elements[] = str_replace(array("{member}", "{first}", "{second}"), array(
                isset($displayMemberKeys[$member]) ? $displayMemberKeys[$member] : $member,
                $data["first"], $data["second"]), $formatString);
        }

        return join($separator, $elements);

    }
724103
static function jsonEncode($object,$option=0)
    {
        $marks = Utility::mark_js_function($object);
        $text = json_encode($object, $option);
        foreach ($marks as $i=>$js) {
            $text = str_replace("\"--js($i)\"", $js, $text);
        }
        return $text;
    }
123819
public String format(String key,
                         Object object) {
        if (traceNLS != null) {
            return traceNLS.getFormattedMessage(key, new Object[] { object }, defaultMessage);
        } else {
            return objectsToString(key, object);
        }
    }
1317708
public static function decode(String $data, String $key = NULL, String $separator = NULL) : stdClass
    {
        $key       = $key       ?: self::$key;
        $separator = $separator ?: self::$separator;

        $keyval = explode($separator, $data);
        $splits = [];
        $object = [];

        if( is_array($keyval) ) foreach( $keyval as $v )
        {
             $splits = explode($key, $v);

             if( isset($splits[1]) )
             {
                $object[$splits[0]] = $splits[1];
             }
        }

        return (object) $object;
    }
1090793
public function normalize($object, $format = null, array $context = [])
    {
        /** @var object $normalized */
        $normalized = parent::normalize($object, $format, $context);
        $normalized->type = RatePlanInterface::TYPE_DEVELOPER;

        return $normalized;
    }
777356
protected function formatAble(&$object)
    {
        if (!is_object($object) || is_array($object)) {
            throw new InvalidArgumentException('The given argument is not an object/array.');
        }

        if (!is_object($object) && $object instanceof FormatAble) {
            return;
        }

        $object = new FormatAbleObject(clone($object));
    }
154181
protected function getClasses(string $option, string $separator = ' '): string
    {
        return implode($separator, $this->getOption($option));
    }
884936
public static function getCamelCase($string, $separator = ' ')
    {
        if (empty($string)) {
            return '';
        }

        $effect = '';
        $members = explode($separator, $string);

        foreach ($members as $key => $value) {
            $value = mb_strtolower($value);

            if (0 === $key) {
                $effect .= self::lowercaseFirst($value);
            } else {
                $effect .= self::uppercaseFirst($value);
            }
        }

        return $effect;
    }
1205205
public function toQueryString($separator = '&', $encoding = PHP_QUERY_RFC3986)
    {
        return http_build_query($this->toArray(), null, $separator, $encoding);
    }
197955
public static function To($Mixed, $FormatMethod) {
      if ($FormatMethod == '')
         return $Mixed;
      
      if (is_string($Mixed)) {
         if (method_exists('Gdn_Format', $FormatMethod)) {
            $Mixed = self::$FormatMethod($Mixed);
         } elseif (function_exists($FormatMethod)) {
            $Mixed = $FormatMethod($Mixed);
         } elseif ($Formatter = Gdn::Factory($FormatMethod.'Formatter')) {;
            $Mixed = $Formatter->Format($Mixed);
         } else {
            $Mixed = Gdn_Format::Text($Mixed);
         }
      } else if (is_array($Mixed)) {
         foreach($Mixed as $Key => $Val) {
            $Mixed[$Key] = self::To($Val, $FormatMethod);
         }
      } else if (is_object($Mixed)) {
         foreach(get_object_vars($Mixed) as $Prop => $Val) {
            $Mixed->$Prop = self::To($Val, $FormatMethod);
         }
      }
      return $Mixed;
   }
401169
public static function urlEncodeShortName($object) {
        $classname = static::getShortName($object);
        $explode   = preg_replace("/([a-z]{1})([A-Z]{1})/", "$1-$2", $classname);
        return strtolower($explode);
    }
394264
public static function camelCaseToSeparated($string, $separator = '-', $toLowerCase = true)
    {
        $separated = preg_replace(['/([a-z\d])([A-Z])/', '/([^' . preg_quote($separator) . '])([A-Z][a-z])/'], '$1' . $separator . '$2', $string);
        return $toLowerCase ? strtolower($separated) : $separated;
    }
1011375
public static function camelize($string, $separator = null, $preserveWhiteSpace = false, $isKey = false)
    {
        empty($separator) && $separator = ['_', '-'];

        $_newString = ucwords(str_replace($separator, ' ', $string));

        if (false !== $isKey) {
            $_newString = lcfirst($_newString);
        }

        return (false === $preserveWhiteSpace ? str_replace(' ', null, $_newString) : $_newString);
    }
1060204
final public function queryOnString(string $query, string $default = '', string $separator = ', '): string
    {
        $array = $this->queryArrayOne($query);
        if (false === $array) {
            return $default;
        }
        return implode($separator, $array);
    }
1086055
public function getErrorsAsString(string $separator='<br />'): string
  {
    $errors = $this->errors;
    
    foreach($errors as &$error){
      $error = $error->getMessage();
    }
    
    return implode($separator, $errors);
  }
1199709
public function formatter($object)
    {
        $interfaces = class_implements($object);

        foreach ($interfaces as $interface) {
            $class = $this->getClassName($interface);

            if (isset($this->formatters[$class])) {
                return $this->formatters[$class];
            }
        }

        $class = $this->getClassName(get_class($object));

        return $this->formatters[$class];
    }
1045535
public function determineObjectValue($objectString)
    {
        // checks if ^^< is in $objectString
        $arrowPos = strpos($objectString, '"^^<');
        $atPos = strpos($objectString, '"@');

        // checks if $objectString starts with " and contains "^^<
        if ('"' === substr($objectString, 0, 1) && false !== $arrowPos) {
            return substr($objectString, 1, $arrowPos - 1);

        // checks for surrounding ", without ^^<
        } elseif ('"' == substr($objectString, 0, 1)
            && '"' == substr($objectString, strlen($objectString) - 1, 1)) {
            return substr($objectString, 1, strlen($objectString) - 2);

        // checks for "@
        } elseif (false !== $atPos) {
            return substr($objectString, 1, $atPos - 1);

        // checks for ? at the beginning
        } elseif ('?' === substr($objectString, 0, 1)) {
            return substr($objectString, 1);
        } elseif ($this->rdfHelpers->simpleCheckURI($objectString)) {
            return $objectString;

        // malformed string, return null as datatype
        } else {
            return null;
        }
    }