Converts Doctrine length, precision and scale to migration-compatible length string
@return string
189186
public static function doctrineLengthToMigrationLength($column)
    {
        $typeName = $column->getType()->getName();
        $migrationTypeName = self::toMigrationMethodName($typeName, $column->getName());

        if (in_array($migrationTypeName, self::getDecimalTypes())) {
            return $column->getPrecision().','.$column->getScale();
        }

        if (in_array($migrationTypeName, self::getIntegerTypes())) {
            return $column->getPrecision();
        }

        return $column->getLength();
    }
635585
public function getSignatureBaseString() {
		$parts = [
			$this->getNormalizedMethod(),
			$this->getNormalizedUrl(),
			$this->getSignableParameters()
		];

		$parts = Util::urlencode( $parts );

		return implode( '&', $parts );
	}
861698
public function getLongVersion(): string
	{
		$name = $this->getName();

		if ($name === '')
		{
			$name = 'Joomla Console Application';
		}

		if ($this->getVersion() !== '')
		{
			return sprintf('%s <info>%s</info>', $name, $this->getVersion());
		}

		return $name;
	}
837234
public function camelize($s)
	{
		$s = preg_replace('/[_-]+/','_',trim($s));
		$s = str_replace(' ', '_', $s);

		$camelized = '';

		for ($i=0,$n=strlen($s); $i<$n; ++$i)
		{
			if ($s[$i] == '_' && $i+1 < $n)
				$camelized .= strtoupper($s[++$i]);
			else
				$camelized .= $s[$i];
		}

		$camelized = trim($camelized,' _');

		if (strlen($camelized) > 0)
			$camelized[0] = strtolower($camelized[0]);

		return $camelized;
	}
64386
public function byteSize()
    {
        return mb_strlen($this->name) +
                mb_strlen($this->type) +
                mb_strlen($this->value);
    }
1136599
public static function formatIniParamSize(string $res): int
    {
        $res = trim($res);
        $measure = strtolower($res[strlen($res) - 1]);
        $res = (int)$res;

        // No breaks in switch, because we need multiple calculations
        switch ($measure) {
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'g':
                $res *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'm':
                $res *= 1024;
            case 'k':
                $res *= 1024;
        }

        return $res;
    }
344194
public static function stringLength($value)
    {
        if (is_null(self::$multiByteSupport)) {
            self::$multiByteSupport = intval(ini_get('mbstring.func_overload'));
        }

        if (self::$multiByteSupport & 2) {
            return mb_strlen($value, '8bit');
        } else {
            return strlen($value);
        }
    }
452936
protected function getValueLength()
    {
        if ($this->maxlength_ignored_characters != '') {
            $chars = preg_quote($this->maxlength_ignored_characters, '/');
            $pattern = sprintf('/[%s]/u', $chars);
            $value = preg_replace($pattern, '', $this->value);
            $length = mb_strlen($value);
        } else {
            $length = mb_strlen($this->value);
        }
        return $length;
    }
828393
public function length(): float
    {
        if ($this->length === 0) {
            $this->length = $this->recomputeLength();
        }

        return $this->length;

    }
394629
private function minLength()
	{
		$min = mb_strlen($this->value);
		if (!$ret = $min >= $this->options->min) {
			$this->error(2);
		}

		return $ret;
	}
1073433
public function getLength()
    {
        if (!$this->stub && !is_int($this->length)) {
            $this->length = strlen($this->data);
        }

        return $this->length;
    }
1229085
public function formatDecimal( int $precision = 8 ) : string
   {

      $returnValue = '';

      if ( ! $this->isValid() )
      {
         return $returnValue;
      }

      $returnValue .= $this->Latitude->formatDecimal( $precision )
                      .  ', '
                      .  $this->Longitude->formatDecimal( $precision );

      return $returnValue;

   }
39323
private function getResizeParamsString(): string
    {
        $ret = '';
        foreach ($this->uriParams['resize-params'] as $param => $value) {
            $ret .= \sprintf('_%s%s', $param, $value);
        }
        return $ret !== '' ? \sprintf('_%s', $ret) : '';
    }
186025
public function length($min = null, $max = null)
	{
		$lastSegmentKey = $this->getLastSegmentKey();

		if (!is_null($min) && !is_null($max) && $max > $min)
		{
			$lengthPattern = sprintf('{%d,%d}', (int) $min, (int) $max);
		}
		elseif (!is_null($min) && !$max)
		{
			$lengthPattern = sprintf('{%d}', (int) $min);
		}
		else
		{
			$lengthPattern = '{1}';
		}

		return $this->replaceQuantifierByKey($lastSegmentKey, $lengthPattern);
	}
735754
function _convertString($string)
    {
        // chop away beggining and ending quotes
        $string = substr($string, 1, strlen($string) - 2);
        if (strlen($string) > 255) {
            return $this->raiseError("String is too long");
        }

        if ($this->_BIFF_version == 0x0500) {
            return pack("CC", $this->ptg['ptgStr'], strlen($string)).$string;
        } elseif ($this->_BIFF_version == 0x0600) {
            $encoding = 0;   // TODO: Unicode support
            return pack("CCC", $this->ptg['ptgStr'], strlen($string), $encoding).$string;
        }
    }
761543
public function camelize() {
        $encoding = $this->encoding;
        $stringy = self::create($this->str, $this->encoding);

        $camelCase = preg_replace_callback(
                '/[-_\s]+(.)?/u', function ($match) use (&$encoding) {
            return $match[1] ? mb_strtoupper($match[1], $encoding) : "";
        }, $stringy->trim()->lowerCaseFirst()->str
        );

        $stringy->str = preg_replace_callback(
                '/[\d]+(.)?/u', function ($match) use (&$encoding) {
            return mb_strtoupper($match[0], $encoding);
        }, $camelCase
        );

        return $stringy;
    }
1363709
private function getSizeFromMetadata()
    {
        foreach ($this->stream->getMetadata('wrapper_data') as $value) {
            if (substr($value, 0, 15) == "Content-Length:") {
                return (int) substr($value, 16);
            }
        }
        return 0;
    }