Begin a string with a single instance of a given value.

@param  string  $value
@param  string  $prefix
@return string
497960
public static function start($value, $prefix)
    {
        $quoted = preg_quote($prefix, '/');

        return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value);
    }
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;
    }
1103325
public static function startsWith($value, $contains, $identical = false)
    {
        $enc = \mb_detect_encoding($value);

        if (false === $identical) {
            return 0 === \mb_stripos($value, $contains, 0, $enc);
        }

        return 0 === \mb_strpos($value, $contains, 0, $enc);
    }
1012187
public static function convertExponentialToString($value)
    {
        if (!is_float($value)) {
            return $value;
        }

        $result = explode('E', strtoupper($value));

        if (count($result) === 1) {
            return $result[0];
        }

        $dotSplitted = explode('.', $result[0]);

        return '0.' . str_repeat('0', abs($result[1]) - 1) . $dotSplitted[0];
    }
1276576
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) {
        return new StartsWith(prefix, offset);
    }
703548
static public function startsWith($string, $needle, $message = null, $propertyPath = null, $encoding = 'utf8')
        {
            static::string($string);

            if (mb_strpos($string, $needle, null, $encoding) !== 0) {
                $message = $message ?: sprintf(
                    'Value "%s" does not start with "%s".',
                    static::stringify($string),
                    static::stringify($needle)
                );

                $constraints = array('needle' => $needle, 'encoding' => $encoding);

                throw static::createException($string, $message, static::INVALID_STRING_START, $propertyPath, $constraints);
            }
        }
565391
private function addPrefixSuffix($value)
    {
        if (!is_null($this->prefix) || !is_null($this->suffix)) {
            return (string) $this->prefix . $value . (string) $this->suffix;
        }

        return $value;
    }
609296
public function createParameter($value, $prefix = 'gen_')
    {
        $prefix = preg_replace('/[^a-z0-9_]/ui', '_', $prefix);
        $prefix .= ++$this->parametersCounter;
        $this->setParameter($prefix, $value);

        return ':'.$prefix;
    }
360741
function prepValueForDB($value) {
		if(!$this->nullifyEmpty && $value === '') {
			return DB::getConn()->prepStringForDB($value);
		} else {
			return parent::prepValueForDB($value);
		}
	}
337862
public function wrap($value, $prefixAlias = false)
    {
        // We will only wrap the value unless it has parentheses
        // in it which is the case where we're matching a node by id, or an *
        // and last whether this is a pre-formatted key.
        if (preg_match('/[(|)]/', $value) || $value == '*' || strpos($value, '.') !== false) return $value;

        // In the case where the developer specifies the properties and not returning
        // everything, we need to check whether the primaryKey is meant to be returned
        // since Neo4j's way of evaluating returned properties for the Node id is
        // different: id(n) instead of n.id

        if ($value == 'id')
        {
            return 'id(' . $this->query->modelAsNode() . ')';
        }
        return $this->query->modelAsNode() . '.' . $value;
    }
898899
private function startsWith($string, $prefix) {
		return $prefix === "" || strrpos($string, $prefix, -strlen($string)) !== FALSE;
	}
689822
public static function beginsWith($subject, $prefix, $encoding = null)
    {
        return Rope::of($subject, $encoding)->beginsWith($prefix);
    }
1220335
public function set($name, $value = '', $prefix = null) {
        $prefix = !is_null($prefix) ? $prefix : $this->prefix;
        if (strpos($name, '.')) {
            // 二维数组赋值
            list($name1, $name2) = explode('.', $name);
            if ($prefix) {
                $_SESSION[$prefix][$name1][$name2] = $value;
            }
            else {
                $_SESSION[$name1][$name2] = $value;
            }
        }
        elseif ($prefix) {
            $_SESSION[$prefix][$name] = $value;
        }
        else {
            $_SESSION[$name] = $value;
        }
    }
113774
def prefix=(value)
      value.is_a?(Prefix) ? super(value) : super(Prefix.find(value.to_s))
    end
1112982
public function prepend($prefix): Utility
    {
        return new static(new static($prefix, $this->encoding) . $this->string, $this->encoding);
    }
244738
public function start( string $prefix ) : SplString
    {
        $quoted = preg_quote( $prefix, '/' );
        return $this->setString( $prefix.preg_replace( '/^(?:'.$quoted.')+/u', '', $this->__toString() ) );
    }
1188099
public static function string($value)
    {
        if (static::stringable($value)) {
            $value = (string) $value;
        } else {
            $value = null;
        }

        return $value;
    }