Formats the locator with specified parameters
321750
def build(self, **variables):
        """"""
        return Locator(self.by, self.locator.format(**variables), self.description)
433763
private static String formatISO6709Long(final PointLocation pointLocation)
  {
    final Latitude latitude = pointLocation.getLatitude();
    final Longitude longitude = pointLocation.getLongitude();
    String string = formatLatitudeLong(latitude) +
                    formatLongitudeLong(longitude);
    final double altitude = pointLocation.getAltitude();
    string = string + formatAltitudeWithSign(altitude);
    final String crs = pointLocation.getCoordinateReferenceSystemIdentifier();
    string = string + formatCoordinateReferenceSystemIdentifier(crs);
    return string + "/";
  }
251052
def _format_param_value(key, value):
    
    if isinstance(value, str):
        value = "'{}'".format(value)
    return "{}={}".format(key, value)
1280656
def format(format_string, params)
      format_string.gsub(/\%(?:\{(.*?)\})?>?([a-zA-Z%])/){
         param, spec = $1, $2
         case spec[0]
         when ?e, ?i, ?n, ?o
           raise AccessLogError,
             "parameter is required for \"#{spec}\"" unless param
           (param = params[spec][param]) ? escape(param) : "-"
         when ?t
           params[spec].strftime(param || CLF_TIME_FORMAT)
         when ?p
           case param
           when 'remote'
             escape(params["i"].peeraddr[1].to_s)
           else
             escape(params["p"].to_s)
           end
         when ?%
           "%"
         else
           escape(params[spec].to_s)
         end
      }
    end
475362
public static String format(String uriTemplate, Collection<?> args) {

        StringBuilder sb = new StringBuilder();

        int beginIndex = 0;

        for (Object arg : args) {

            int endIndex = uriTemplate.indexOf(PLACE_HOLDER, beginIndex);

            sb.append(uriTemplate.subSequence(beginIndex, endIndex)).append(arg);

            beginIndex = endIndex + PLACE_HOLDER_LENGTH;
        }

        sb.append(uriTemplate.substring(beginIndex));

        return sb.toString();

    }
478349
void markAllParametersEscaped() {
    Node paramList = NodeUtil.getFunctionParameters(jsScope.getRootNode());
    for (Node arg = paramList.getFirstChild(); arg != null; arg = arg.getNext()) {
      if (arg.isRest() || arg.isDefaultValue()) {
        escaped.add(jsScope.getVar(arg.getFirstChild().getString()));
      } else {
        escaped.add(jsScope.getVar(arg.getString()));
      }
    }
  }
576981
def format(self, node_formatter=None, separator='/'):
        # type: (Optional[Callable[[PathParam], str]]) -> str
        
        if self._nodes == ('',):
            return separator
        else:
            node_formatter = node_formatter or self.odinweb_node_formatter
            return separator.join(node_formatter(n) if isinstance(n, PathParam) else n for n in self._nodes)
145969
private static function format() {

		$routes = static :: getRoutes();

		foreach($routes as $identifier => $route) {

			$url = preg_quote($route -> getUrl(), '/'); 

			//Prepend prefix for url
			if($prefix = $route -> getPrefix()) {
				$url = $prefix['url'] . $url;
			}

			if(preg_match_all('#(\\\/)*\\\{([a-zA-Z0-9_.]+)(\\\\\?)?\\\}#i', $url, $matches)) {
				
				foreach($matches[0] as $index => $match) {

					$match 		= $matches[0][$index];
					$slash 		= $matches[1][$index];
					$type 		= $matches[2][$index];
					$optional 	= $matches[3][$index];
					$where 		= $route -> getWhere();
					$variable 	= '';
					$typefound 	= false;

					if('' !== $slash) {
						$variable .= '\/';
					}

					if(true === is_array($where)) {
						
						foreach($where as $key => $regex) {
							
							if($key === $type) {
								
								$variable .= $regex;
								$typefound = true;
								break;
							}
						}
					}

					if(false === $typefound) {

						if(isset(static :: $types[$type])) {
							$variable .= static :: $types[$type];
						}
						else {
							$variable .= static :: $types['string'];	
						}
					}

					if('' !== $optional) {
						$variable = '('. $variable .')?';
					}
					else {
						$variable = '('. $variable .')';
					}
					
					$url = preg_replace('#' . preg_quote($match, '/') . '#', $variable, $url, 1);
				}
			}

			$route -> setMatch($url);
		}
	}
921952
function formatPath(urlobj)
{
	var path = urlobj.pathname;
	
	if (urlobj.search !== null)
	{
		path += urlobj.search;
	}
	
	return path;
}
261398
private static String formatHumanShort(final PointLocation pointLocation)
  {
    final Latitude latitude = pointLocation.getLatitude();
    final Longitude longitude = pointLocation.getLongitude();
    String string = formatLatitudeHumanShort(latitude) + " " +
                    formatLongitudeHumanShort(longitude);
    final double altitude = pointLocation.getAltitude();
    if (altitude != 0)
    {
      string = string + " " + formatAltitudeWithSign(altitude);
    }
    return string;
  }
978186
private static void appendLocatorXPath(StringBuilder builder, String locatorName, WebLocator locator, boolean compact) {
        String path = locator.getXPath();
        String xpathLocatorVar = "xpath_" + locatorName;
        String newLine = compact ? "" : "\n";
        builder.append("var ").append(xpathLocatorVar).append("Path = \"").append(path).append("\";").append(newLine);
        builder.append("var ").append(xpathLocatorVar).append(" = $x(").append(xpathLocatorVar).append("Path);").append(newLine);
        builder.append("if (").append(xpathLocatorVar).append("[0]) {").append(newLine);
        builder.append("  console.info('").append(locatorName).append("', ").append(xpathLocatorVar).append("[0]);").append(newLine);
        builder.append("  if (").append(xpathLocatorVar).append(".length > 1) console.warn('  found more elements', ").append(xpathLocatorVar).append(");").append(newLine);
        builder.append("} else {").append(newLine);
        builder.append("  console.error('").append(locatorName).append("', ' - not found!');").append(newLine);
        builder.append("  console.warn(\"  \"+").append(xpathLocatorVar).append("Path);").append(newLine);
        builder.append("}").append(newLine).append(newLine);
    }
566435
def to_string(self, formatter = 'D'):
        '''
        
        '''
        return (self.lat.to_string(formatter), self.lon.to_string(formatter))
133135
private static String formatISO6709WithDecimals(final PointLocation pointLocation)
  {
    final Latitude latitude = pointLocation.getLatitude();
    final Longitude longitude = pointLocation.getLongitude();
    String string = formatLatitudeWithDecimals(latitude) +
                    formatLongitudeWithDecimals(longitude);
    final double altitude = pointLocation.getAltitude();
    string = string + formatAltitudeWithSign(altitude);
    final String crs = pointLocation.getCoordinateReferenceSystemIdentifier();
    string = string + formatCoordinateReferenceSystemIdentifier(crs);
    return string + "/";
  }
837220
function winstonFormatter (options) {
    // get callsite to for filename:linenumber where logger was called
    var callsite = callsites()[10]
    // string to log
    return options.level + ': '
        + (typeof options.message === 'string' ? options.message : '' )
        + ' (' + callsite.getFileName() + ':'
        + callsite.getLineNumber() + ':'
        + callsite.getColumnNumber() + ')'
        + (typeof options.meta === 'object' && Object.keys(options.meta).length ? '\n\t'+ JSON.stringify(options.meta) : '' )
}
1192800
def format(self, method, data):
        '''  '''
        if data is None:
            if method == 'GET':
                raise NotFound()
            return ''

        return self._meta.formatter.format(data)
15461
def _format_name_map(self, lonc, latc):
        '''  '''

        return '_'.join(['WAC', 'GLOBAL'] +
                        ['E' + latc + lonc, "{0:0>3}".format(self.ppd) + 'P'])
914147
function format(str, ctx) {
	var splitter = '{',
		isInside = false,
		segment,
		valueAndFormat,
		path,
		i,
		len,
		ret = [],
		val,
		index;
	
	while ((index = str.indexOf(splitter)) !== -1) {
		
		segment = str.slice(0, index);
		if (isInside) { // we're on the closing bracket looking back
			
			valueAndFormat = segment.split(':');
			path = valueAndFormat.shift().split('.'); // get first and leave format
			len = path.length;
			val = ctx;

			// Assign deeper paths
			for (i = 0; i < len; i++) {
				val = val[path[i]];
			}

			// Format the replacement
			if (valueAndFormat.length) {
				val = formatSingle(valueAndFormat.join(':'), val);
			}

			// Push the result and advance the cursor
			ret.push(val);
			
		} else {
			ret.push(segment);
			
		}
		str = str.slice(index + 1); // the rest
		isInside = !isInside; // toggle
		splitter = isInside ? '}' : '{'; // now look for next matching bracket
	}
	ret.push(str);
	return ret.join('');
}