Convert a headers map into a multi-line string

@param {Object} headers
@return {String}
174446
function headersToString(headers){
  var lines = [];
  for(var name in headers){
    lines.push(name + ': ' + headers[name]);
  }
  return lines.join('\n');
}
776382
public T header(Map<String, List<String>> headers) {
		return header(headers, false);
	}
166381
function serializeHeaders(mHeaders) {
		var sHeaderName,
			aHeaders = [];

		for (sHeaderName in mHeaders) {
			aHeaders = aHeaders.concat(sHeaderName, ":", mHeaders[sHeaderName], "\r\n");
		}

		return aHeaders;
	}
949250
function(headers, params) {
        var newHeaders = {};
        for (var header in headers)
            newHeaders[header] = headers[header];
        for (var param in params) {
            var re = new RegExp(":"+ param);
            for (var header in newHeaders) {
                if (newHeaders[header].search(re) != -1) {
                    newHeaders[header] = newHeaders[header].replace(re, params[param]);
                }
            }
        }
        return newHeaders;
    }
672653
public Map<String, String> getHeadersToMap(Map<String, String> map) {
        if (map == null) map = new LinkedHashMap<>();
        final Map<String, String> map0 = map;
        header.forEach((k, v) -> map0.put(k, v));
        return map0;
    }
594856
function formatUsageHeader(headerContent) {
  var headerString =  headerContent instanceof Array ?
    headerContent.join(EOL) :
    headerContent;

  return headerString + EOL;
}
1183441
public static function convertStringHeadersToArray($headers)
    {
        $lines = explode("\r\n", $headers);
        $headers = [];
        foreach ($lines as $line) {
            if (strpos($line, ':')) {
                $headerParts = explode(':', $line);
                $headers[$headerParts[0]] = trim(implode(':', array_slice($headerParts, 1)));
            }
        }
        return $headers;
    }
45353
function getHeaderContent(tokens, type, markup) {
  if (tokens[1].children.length === 0) {
    tokens[1].children.push(getEmptyText());
  } else if (tokens[1].children[0].type !== 'text') {
    tokens[1].children.unshift(getEmptyText());
  }
  const content = changeText(tokens[1].children, markup);
  return {
    type,
    content,
    length: getTokensLength(content)
  };
}
271383
def beautify_headers(headers)
      headers.inject({}) { |out, (key, value)| out[key.gsub(/-/, '_').downcase.to_sym] = value; out }
    end
61540
function renderHeader(statuses) {
  var txt = '';

  // Build Header
  for (var k in statuses) {
    var status = statuses[k];

    // Create header
    var col = centerText(k, width);

    // Set header status color
    if (status === false) {
      col = chalk.dim(col);
    } else {
      col = chalk.white(col);
    }

    txt += col;
  }

  return txt;
}
174288
def with_headers(self, headers):
        
        return self.replace(headers=_merge_maps(self.headers, headers))
947758
def parse_headers(lines, offset=0):
    
    headers = {}
    for header_line in lines[offset:]:
        header_match = HEADER_LINE_RE.match(header_line)
        if header_match:
            key = header_match.group('key')
            key = re.sub(r'\\.', _unescape_header, key)
            if key not in headers:
                value = header_match.group('value')
                value = re.sub(r'\\.', _unescape_header, value)
                headers[key] = value
    return headers
853825
function headersToString(headers) {
  let ret = [];
  headers.forEach(function(value, name) {
    ret.push(`${name.toLowerCase()}: ${value}`);
  });
  return ret.join('\n');
}
171454
function (header) {
        if (!_.isString(header)) { return { key: E, value: E }; }

        var index = header.indexOf(HEADER_KV_SEPARATOR),
            key,
            value;

        (index < 0) && (index = header.length);

        key = header.substr(0, index);
        value = header.substr(index + 1);

        return {
            key: _.trim(key),
            value: _.trim(value)
        };
    }
992331
def format_headers
      @headers.stringify_keys.each_with_object({}) do |key_with_value, headers|
        headers[format_key(key_with_value.first)] = key_with_value.last
      end
    end
292774
function csvToMapping(csvString) {
  const lines = csvString.split(/\n|\r|\r\n/);
  const header = lines.shift().split(',');
  const key = header.shift();
  const now = new Date();
  const headerIdx = [];
  const fields = [];
  header.forEach((h, i) => {
    if (h === '') return;
    headerIdx.push(i);
    fields.push({key: h, format: 'text'});
  });
  const mapping = {
    created: now.toString(),
    fields: fields,
    key: key,
    mapping: {}
  };
  lines.forEach(line => {
    const values = line.split(',');
    const k = values.shift();
    mapping.mapping[k] = Array(headerIdx.length);
    headerIdx.forEach(i => {
      mapping.mapping[k][i] = values[i];
    });
  });
  return mapping;
}
93238
public static <K, V> List<String> getAllAsString(Headers<K, V, ?> headers, K name) {
        final List<V> allNames = headers.getAll(name);
        return new AbstractList<String>() {
            @Override
            public String get(int index) {
                V value = allNames.get(index);
                return value != null ? value.toString() : null;
            }

            @Override
            public int size() {
                return allNames.size();
            }
        };
    }