Convert to constant

@param string $var
@param string $prefix = NULL
@param string $suffix = NULL
180238
public static function toConstant(String $var, String $prefix = NULL, String $suffix = NULL)
    {
        return Helper::toConstant($var, $prefix, $suffix);
    }
604275
public function load( $var )
    {
        $success = true;
        $val = apc_fetch( $this->_prefix . $var, $success );

        if( $success === false )
            return null;

        return $val;
    }
610659
public function addVarListWithPrefix(array $vars, $prefix, $render=true) {
		$newVars = array();
		foreach($vars as $k=>$v) {
			$newVars[$prefix . $k] = $v;
		}
		
		$this->addVarList($newVars);
		return $this;
	}
830279
public function setPrefix($prefix)
    {
        if ($prefix != '') {
            $urlParts = parse_url($prefix);

            // Since PHP 5.4.7 parse_url will return host when url scheme is ommited.
            // This allows urls like //static.example.com to be used
            if (isset($urlParts['scheme']) || isset($urlParts['host'])) {
                $prefix = rtrim($prefix, '/') . '/';
            } else {
                $prefix = '/' . trim($prefix, '/') . '/';
            }
        }

        $this->prefix = $prefix;
    }
83624
private function truncate($text, $length, $suffix = '...')
    {
        $computedLength = $length - strlen($suffix);

        return strlen($text) > $computedLength ? substr($text, 0, $computedLength) . $suffix : $text;
    }
584690
public function setSuffix($suffix)
    {
        $this->_suffix = $suffix;
        $this->request->setPathInfo(implode('/', [$this->module->id, $suffix]));
    }
369221
protected function addSuffix($suffix, $string)
    {
        if (substr($string, -strlen($suffix)) !== (string) $suffix) {
            $string .= $suffix;
        }

        return $string;
    }
1022214
public static function varExport($var, $indentLevel = 1) {
        $output = array();
        if (is_array($var)) {
            $exploded = explode("\n", var_export($var, true));
            $count = count($exploded);
            $output = array(current($exploded));
            $lineNo = 1;
            while ($line = next($exploded)) {
                $lineNo++;
                if ($lineNo === $count) {
                    $output[] = str_repeat(' ', $indentLevel * 4) . $line;
                    break;
                }
                $split = str_split($line);
                $spaces = 0;
                while ($char = next($split)) {
                    if ($char !== ' ') break;
                    $spaces++;
                }
                $output[] = str_repeat('    ', $indentLevel + 1) . str_repeat('    ', $spaces / 2) . substr($line, ($spaces ? $spaces + 1 : 0));
            }
        }
        return implode("\n", $output);
    }
1339682
private function varIsResource($var)
    {
        $this->makeTableHeader("resourceC", "resource", 1);
        echo "<tr>\n<td>\n";
        switch (get_resource_type($var)) {
            case "fbsql result":
            case "mssql result":
            case "msql query":
            case "pgsql result":
            case "sybase-db result":
            case "sybase-ct result":
            case "mysql result":
                $db = current(explode(" ", get_resource_type($var)));
                $this->varIsDBResource($var, $db);
                break;
            case "gd":
                $this->varIsGDResource($var);
                break;
            case "xml":
                $this->varIsXmlResource($var);
                break;
            default:
                echo get_resource_type($var) . $this->closeTDRow();
                break;
        }
        echo $this->closeTDRow() . "</table>\n";
    }
899651
protected static function targetsToString($targets, $prefix = '', $suffix = '')
    {
        $array = [];
        foreach ($targets as $currency) {
            $array[] = '"' . $prefix . $currency . $suffix . '"';
        }

        return implode(', ', $array);
    }
457754
public function bind(string $field, $value, string $prefix = ''): string
    {
    	if ($this->bindings === null) {
    		$this->bindings = new Bindings();
	    }

    	$parameter = $prefix . $field;
    	$bindName = $this->bindings->makeAndSet($parameter, $value);
        return $bindName;
    }
1182013
public static function removeSuffix($string, $suffix)
    {
        if (self::endsWith($string, $suffix)) {
            return mb_substr($string, 0, -mb_strlen($suffix));
        }
        return $string;
    }
1184395
@Override
	public void setDefaultPrefix(final String prefixString) {
		lock.writeLock().lock();
		try {
			if (prefixString == null || StringUtils.isBlank(prefixString)) {
				defaultPrefix = null;
			} else {
				if (prefixes != null) {
					if (!prefixes.contains(prefixString)) {
						throw new IllegalArgumentException("The given prefix is not part of the prefixes.");
					}
				}
				defaultPrefix = prefixString;
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
604573
public static function replace($text, array $replacements = [], $prefix = '{', $suffix = '}')
    {
        $replacements = static::prepareBinding($replacements, $prefix, $suffix);

        $filter = function ($text) use ($replacements) {
            return strtr($text, $replacements);
        };

        if (is_array($text)) {
            $text = array_map($filter, $text);
        } else {
            $text = $filter($text);
        }

        return $text;
    }
138139
public void setPrefix(String prefix)
  {
    _prefix = prefix;
    
    if (prefix != null)
      _pathPrefix = prefix.replace('.', '/');
  }
978687
public static function prefix($prefix = null)
	{
		if(null !== $prefix)
		{
			self::$prefix = $prefix;
		}
		return self::$prefix;
	}
532515
private function stringEndsWith(string $string, string $suffix): bool
    {
        return substr($string, -strlen($suffix)) === $suffix;
    }