Left.

@param string $string
@param int $count
@return string
496622
public static function left(string $string, int $count): string
    {
        return self::substr($string, 0, $count);
    }
232694
public function match(array $left, array $collected = []) {
        $l = $left;
        $c = $collected;

        foreach ($this->children as $pattern) {
            list ($matched, $l, $c) = $pattern->match($l, $c);
            if (!$matched) {
                return [false, $left, $collected];
            }
        }
        return [true, $l, $c];
    }
795359
public static Slice leftTrim(Slice utf8)
    {
        int length = utf8.length();

        int position = firstNonWhitespacePosition(utf8);
        return utf8.slice(position, length - position);
    }
81093
public static function right(string $string, int $count): string
    {
        return self::substr($string, -$count);
    }
983044
public static function lastIn(?string $string, ?string $delimiter, bool $withoutDelimiter = false): ?string
    {
        if (self::likeEmpty($string) || self::likeEmpty($delimiter)) {
            return null;
        }

        $pos = mb_strrpos($string, $delimiter);
        // if entry is not founded return false
        if (!Any::isInt($pos)) {
            return null;
        }

        // remove delimiter pointer
        if ($withoutDelimiter) {
            $pos++;
        }

        return self::sub($string, $pos);
    }
1250813
public function shift($count = 1)
    {
        $return = array();

        if ($count == 1) {
            return array_shift($this->dirParts);
        }

        for ($i=0; $i<$count; $i++) {
            $value = array_shift($this->dirParts);

            if ($value === null) {
                break;
            }

            $return[] = $value;
        }

        return $return;
    }
1009039
function left() {
            if ( ! $this->is_active() || $this->is_expired() ) {
                return 0;
            }

            if ( $this->is_unlimited() ) {
                return 999;
            }

            return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
        }
272748
public function deleteLast($value, int $count = 1): int
    {
        return $this->handle->lRem($this->name, $value, -$count);
    }
1079889
public function lrem($key, $count, $value) {
        return $this->returnCommand(['LREM'], $key, [$key, $count, $value]);
    }
79463
public JcString left(int n) {
		JcNumber left = new JcNumber(n, this, OPERATOR.Common.COMMA_SEPARATOR);
		SubString ret = new SubString(null, left,
				new FunctionInstance(FUNCTION.String.LEFT, 2));
		QueryRecorder.recordInvocationConditional(this, "left", ret, QueryRecorder.literal(n));
		return ret;
	}
273862
public StringGrabber left(int charCount) {
		String str = getCropper().getLeftOf(sb.toString(), charCount);
		sb = new StringBuilder(str);
		return StringGrabber.this;

	}
104605
protected function eol(string $str, string $eol = '', int $count = null):string{
		return str_replace($this->options->placeholder_eol, $eol, $str, $count);
	}
295863
def send_left(self, count):
        
        for i in range(count):
            self.interface.send_key(Key.LEFT)
1346117
def value_left(self, other):
    
    return other.value if isinstance(other, self.__class__) else other
901445
private function unpackCondition(string $condition, int $count): string
    {
        // Replace a grouped placeholder with an matching count of placeholders.
        $params = '?' . \str_repeat(', ?', $count - 1);
        return \str_replace('?*', $params, $condition);
    }
1095992
protected function firstKeySegments($key, $count=1)
    {
        $segments = explode('.', $key);
        return implode('.', array_slice($segments, 0, $count));
    }
775846
public function left($n)
    {
        if ($n < 0 || $n > $this->size()) {
            return new MString($this->text);
        }

        $result = substr($this->text, 0, $n);

        if ($result === false) {
            return null;
        }

        return new MString($result);
    }