Builds and formats a page link URL.

@since  5.0.0
@access protected
@param  string    $format
@param  int       $number
@return string
18145
protected function buildUrl( $format, $number ) {

		$link = str_replace( '%_%', $format, $this->args['base'] );
		$link = str_replace( '%#%', $number, $link );

		// Adds any existing or new query vars to the URL.
		if ( $this->args['add_args'] ) {
			$link = add_query_arg( $this->args['add_args'], $link );
		}

		// Appends a fragment to the end of the URL.
		$link .= $this->args['add_fragment'];

		// Applies the core WP `paginate_links` filter hook.
		return apply_filters( 'paginate_links', $link );
	}
562240
protected function buildLinkUrl( $offset )
	{
		$param	= $this->getOption( 'param' );
		$param[$this->getOption( 'keyOffset' )] = $offset;
		$list	= array();
		foreach( $param as $key => $value )
			$list[]	= $key.$this->getOption( 'keyAssign' ).$value;
		$param	= implode( $this->getOption( 'keyParam' ), $list );
		$link	= $this->getOption( 'uri' ).$this->getOption( 'keyRequest' ).$param;
		return $link;
	}
1102906
protected static function format(array $data, $format)
    {
        $format = strtolower($format);
        switch ($format) {
            case static::CONTENT_TYPE_FORM:
                return http_build_query($data);
            case static::CONTENT_TYPE_JSON:
                return json_encode($data);
            default:
                throw new InvalidArgumentException('Format not supported');
        }
    }
1202525
public static function BigNumber($Number, $Format = '') {
      if (!is_numeric($Number))
         return $Number;
		
		$Negative = FALSE;
		$WorkingNumber = $Number;
		if ($Number < 0) {
			$Negative = TRUE;
			$WorkingNumber = $Number - ($Number * 2);
		}

      if ($WorkingNumber >= 1000000000) {
         $Number2 = $WorkingNumber / 1000000000;
         $Suffix = "B";
      } elseif ($WorkingNumber >= 1000000) {
         $Number2 = $WorkingNumber / 1000000;
         $Suffix = "M";
      } elseif ($WorkingNumber >= 1000) {
         $Number2 = $WorkingNumber / 1000;
         $Suffix = "K";
      } else
         $Number2 = $Number;
		
		if ($Negative)
			$Number2 = $Number2 - ($Number2 * 2);

      if (isset($Suffix)) {
         $Result = number_format($Number2, 1);
			if (substr($Result, -2) == '.0')
				$Result = substr($Result, 0, -2);
				
			$Result .= $Suffix;
      } else {
         $Result = $Number;
      }
      
      if ($Format == 'html')
         $Result = Wrap($Result, 'span', array('title' => number_format($Number)));
      
      return $Result;
   }
856730
private function buildUrl($method, $params)
    {
        $url = $this->address.$method;

        return $url."?".http_build_query($params);
    }
29746
public function format($format)
    {
        // Sprintf and unit regex
        $pattern = '/(%(?:\d+\$)?[+-]?(?:[ 0]|\'.{1})?-?\d*(?:\.\d+)?[bcdeEufFgGosxX])([ ]*)(.*)/';

        // Check if string has sprintf and unit...
        if (preg_match_all($pattern, $format, $m)) {
            $sprintf = $m[1][0];
            $space   = $m[2][0];
            $units   = $m[3][0];

            $velocity = $this->units($units);

            // Should just display as scientific notation?
            if (sprintf($sprintf, $velocity) == 0 || $velocity > 10e9) {
                // Change sprintf to use e for scientific notation
                $sprintf = preg_replace('/[bcdeEufFgGosxX]/', 'e', $sprintf);
            }

            // Return format
            return sprintf($sprintf, $velocity) . $space . $units;
        }
    }
1362306
private function ipAddressCalculation($format, $separator = '')
    {
        return implode($separator, array_map(
            function ($quad) use ($format) {
                return sprintf($format, $quad);
            },
            $this->quads
        ));
    }
974568
public function formatColumn(string $column, string $format)
    {
        $this->worksheet
            ->getStyle($column . '1:' . $column . $this->worksheet->getHighestRow())
            ->getNumberFormat()
            ->setFormatCode($format);
    }
546496
public function getApiURL($format = null)
    {
        $apiUrl = str_replace(['.'.$this->format, '?limit=0'], '', $this->apiURL);
        return $apiUrl.(empty($format) ? '' : '.'.$format );
    }
727786
private function getUrlToOldApi($method, array $params, $format)
    {
        $queryString = sprintf(
            '?apikey=%s&format=%s&method=%s%s',
            $this->getApiKey(),
            $format,
            $method,
            $this->paramsQueryStringBuilder($params)
        );

        return sprintf(
            $this::API_URL,
            $this->getDc(),
            $this->getApiVersion(),
            $queryString
        );
    }
374890
protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }
1146945
public function generate($format = 'php')
    {
        // Check if the generator for this format exists
        $method = 'generate'.ucfirst($format).'Helper';
        if (method_exists($this, $method)) {
            return $this->$method();
        }

        return $this->generatePhpHelper();
    }
1014072
public function setFormat($format = null)
    {
        if ( ! is_null($format)) {
            self::checkFormat($format);
            $this->format = $format;
        }

        return $this;
    }
716303
public function getFormatWebPath($format = null)
    {
        if (!$format = $format ?: $this->defaultFormat) {
            return $this->getWebPath();
        }

        return ($formattedImage = $this->getFormattedImage($format))
            ? $formattedImage->getWebPath()
            : $this->getWebPath()
        ;
    }
1161388
public function format($format) {

		if(false === is_string($format)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($format)), E_USER_ERROR);
		}

		$this -> format = $format;

		return $this;
	}
1303573
public static function format_phone($string = '', $format = null)
	{
		is_null($format) and $format = static::$config['formatting']['phone'];
		return static::format($string, $format);
	}
83533
public static function string($value, $format = null)
    {
        if (is_null($format)) {
            $format = '%s';
        }

        return sprintf($format, $value);
    }