Concatenate values of a given key as a string.

        :param value: The value
        :type value: str

        :param glue: The glue
        :type glue: str

        :rtype: str
557528
def implode(self, value, glue=''):
        
        first = self.first()

        if not isinstance(first, (basestring)):
            return glue.join(self.pluck(value).all())

        return value.join(self.items)
1048256
def _coerceValue(self,value,strict=0):
        
        try:
            if isinstance(value,str):
                # allow single blank-separated string as input
                value = value.split()
            if len(value) != len(self.value):
                raise IndexError
            v = len(self.value)*[0]
            for i in range(len(v)):
                v[i] = self._coerceOneValue(value[i],strict)
            return v
        except (IndexError, TypeError):
            raise ValueError("Value must be a " + repr(len(self.value)) +
                    "-element array for " + self.name)
720836
def create_string(self, value: str) -> String:
        
        self.append((
            8,
            self.create_utf8(value).index
        ))
        return self.get(self.raw_count - 1)
984777
def add_key_value(self, key, value):
        
        if key == 'unique_id':
            self._unique_id = str(value)
        else:
            self._data[key] = value
825904
def content(self, value):
        
        value = self._prepend_seperator(value)
        self._content = value
1296081
public void addValue(String value) {
        if (value == null)
            return;

        StringBuffer buffer = new StringBuffer();

        int l = value.length();
        State state = State.VALUE;
        boolean quoted = false;
        boolean sloshed = false;
        int nws_length = 0;
        int last_length = 0;
        int value_length = -1;
        int param_name = -1;
        int param_value = -1;

        for (int i = 0; i <= l; i++) {
            char c = i == l ? 0 : value.charAt(i);

            // Handle quoting https://tools.ietf.org/html/rfc7230#section-3.2.6
            if (quoted && c != 0) {
                if (sloshed)
                    sloshed = false;
                else {
                    switch (c) {
                        case '\\':
                            sloshed = true;
                            if (!_keepQuotes)
                                continue;
                            break;
                        case '"':
                            quoted = false;
                            if (!_keepQuotes)
                                continue;
                            break;
                    }
                }

                buffer.append(c);
                nws_length = buffer.length();
                continue;
            }

            // Handle common cases
            switch (c) {
                case ' ':
                case '\t':
                    if (buffer.length() > last_length) // not leading OWS
                        buffer.append(c);
                    continue;

                case '"':
                    quoted = true;
                    if (_keepQuotes) {
                        if (state == State.PARAM_VALUE && param_value < 0)
                            param_value = nws_length;
                        buffer.append(c);
                    } else if (state == State.PARAM_VALUE && param_value < 0)
                        param_value = nws_length;
                    nws_length = buffer.length();
                    continue;

                case ';':
                    buffer.setLength(nws_length); // trim following OWS
                    if (state == State.VALUE) {
                        parsedValue(buffer);
                        value_length = buffer.length();
                    } else
                        parsedParam(buffer, value_length, param_name, param_value);
                    nws_length = buffer.length();
                    param_name = param_value = -1;
                    buffer.append(c);
                    last_length = ++nws_length;
                    state = State.PARAM_NAME;
                    continue;

                case ',':
                case 0:
                    if (nws_length > 0) {
                        buffer.setLength(nws_length); // trim following OWS
                        switch (state) {
                            case VALUE:
                                parsedValue(buffer);
//                                value_length = buffer.length();
                                break;
                            case PARAM_NAME:
                            case PARAM_VALUE:
                                parsedParam(buffer, value_length, param_name, param_value);
                                break;
                        }
                        _values.add(buffer.toString());
                    }
                    buffer.setLength(0);
                    last_length = 0;
                    nws_length = 0;
                    value_length = param_name = param_value = -1;
                    state = State.VALUE;
                    continue;

                case '=':
                    switch (state) {
                        case VALUE:
                            // It wasn't really a value, it was a param name
                            value_length = param_name = 0;
                            buffer.setLength(nws_length); // trim following OWS
                            String param = buffer.toString();
                            buffer.setLength(0);
                            parsedValue(buffer);
                            value_length = buffer.length();
                            buffer.append(param);
                            buffer.append(c);
                            last_length = ++nws_length;
                            state = State.PARAM_VALUE;
                            continue;

                        case PARAM_NAME:
                            buffer.setLength(nws_length); // trim following OWS
                            buffer.append(c);
                            last_length = ++nws_length;
                            state = State.PARAM_VALUE;
                            continue;

                        case PARAM_VALUE:
                            if (param_value < 0)
                                param_value = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                    }
                    continue;

                default: {
                    switch (state) {
                        case VALUE: {
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                        }

                        case PARAM_NAME: {
                            if (param_name < 0)
                                param_name = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                        }

                        case PARAM_VALUE: {
                            if (param_value < 0)
                                param_value = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                        }
                    }
                }
            }
        }
    }
1317827
def stringify(self, use_bytes=False):
        
        def _str_value(value):
            if isinstance(value, (list, tuple)):
                value = (self.EOL + '\t').join(map(_str_value, value))
            elif callable(value):
                value = _str_value(value())
            return value

        s = self.EOL.join(("{key}: {value}".format(key=key,
                                                   value=_str_value(value))
                           for key, value in self._header_data.values()
                           if value is not None))
        return s + (self.EOL * 2)
1139620
function joinValue(varname, value, count, skipEmpties)
{
	var output = "";
	
	// If accept or ignore "?=" and "?query="
	if ((varname!=="" && value!=="") || skipEmpties!==true)
	{
		output += (++count.i>1) ? "&" : "?";
		
		varname = encodeURIComponent(varname);
		
		if (value !== "")
		{
			// "?query=this+is+a+value"
			output += varname +"="+ encodeURIComponent(value).replace(/%20/g,"+");
		}
		else
		{
			// "?query="
			output += varname+"=";
		}
	}
	
	return output;
}
51805
def _append_object(self, value, _file):
        
        _labs = ' {'
        _file.write(_labs)
        self._tctr += 1

        for (_item, _text) in value.items():
            _tabs = '\t' * self._tctr
            _cmma = ',' if self._vctr[self._tctr] else ''
            _keys = '{cmma}\n{tabs}"{item}" :'.format(cmma=_cmma, tabs=_tabs, item=_item)
            _file.write(_keys)

            self._vctr[self._tctr] += 1

            _text = self.object_hook(_text)
            _type = type(_text).__name__
            _MAGIC_TYPES[_type](self, _text, _file)

        self._vctr[self._tctr] = 0
        self._tctr -= 1
        _tabs = '\t' * self._tctr
        _labs = '\n{tabs}{}'.format('}', tabs=_tabs)
        _file.write(_labs)
910745
def wrap(self, value):
        ''' 
        '''
        self.validate_wrap(value)
        ret = {}
        for k, v in value.items():
            ret[k] = self.value_type.wrap(v)
        return ret
414390
def stringify(self, value):
        
        # SuperModel -> UID
        if ISuperModel.providedBy(value):
            return str(value)
        # DateTime -> ISO8601 format
        elif isinstance(value, (DateTime)):
            return value.ISO8601()
        # Image/Files -> filename
        elif safe_hasattr(value, "filename"):
            return value.filename
        # Dict -> convert_value_to_string
        elif isinstance(value, dict):
            return {k: self.stringify(v) for k, v in value.iteritems()}
        # List -> convert_value_to_string
        if isinstance(value, (list, tuple, LazyMap)):
            return map(self.stringify, value)
        # Callables
        elif safe_callable(value):
            return self.stringify(value())
        elif isinstance(value, unicode):
            value = value.encode("utf8")
        try:
            return str(value)
        except (AttributeError, TypeError, ValueError):
            logger.warn("Could not convert {} to string".format(repr(value)))
            return None
790916
def _append_string(self, value, _file):  # pylint: disable=no-self-use
        
        _text = str(value).replace('"', '\\"')
        _labs = ' "{text}"'.format(text=_text)
        _file.write(_labs)
360354
def join(self, vals):
        
        if len(vals) == 1:
            return vals[0]
        raise Exception(
            "Too many values for {}:{}".format(self._component_name, self._key)
        )
289884
function prepend (value, string) {
  if (
    value === null || value === undefined || value === '' ||
    string === null || string === undefined
  ) {
    return value
  }
  return string + value
}
227023
def _SetValues(self, values):
    

    def _ToStr(value):
      """Convert individul list entries to string."""
      if isinstance(value, (list, tuple)):
        result = []
        for val in value:
          result.append(str(val))
        return result
      else:
        return str(value)

    # Row with identical header can be copied directly.
    if isinstance(values, Row):
      if self._keys != values.header:
        raise TypeError('Attempt to append row with mismatched header.')
      self._values = copy.deepcopy(values.values)

    elif isinstance(values, dict):
      for key in self._keys:
        if key not in values:
          raise TypeError('Dictionary key mismatch with row.')
      for key in self._keys:
        self[key] = _ToStr(values[key])

    elif isinstance(values, list) or isinstance(values, tuple):
      if len(values) != len(self._values):
        raise TypeError('Supplied list length != row length')
      for (index, value) in enumerate(values):
        self._values[index] = _ToStr(value)

    else:
      raise TypeError('Supplied argument must be Row, dict or list, not %s',
                      type(values))
279811
@SuppressWarnings({ "rawtypes", "unchecked" })
    public static String join(final Map value, final String delim) {
        if (value == null || value.isEmpty()) {
            return "";
        }
        final StringBuilder buf = new StringBuilder();
        for (final Iterator<Map.Entry<String, String>> i = value.entrySet().iterator(); i.hasNext();) {
            final Map.Entry<String, String> e = i.next();
            buf.append(e.getKey()).append(EQUAL).append(e.getValue());
            if (i.hasNext()) {
                buf.append(delim);
            }
        }
        return buf.toString();
    }
376373
function stringify(values, options) {
  var settings = options || {}
  var left = settings.padLeft === false ? empty : space
  var right = settings.padRight ? space : empty

  /* Ensure the last empty entry is seen. */
  if (values[values.length - 1] === empty) {
    values = values.concat(empty)
  }

  return values.join(right + comma + left).trim()
}