PositionOf
class PositionOf extends Mutator (View source)
Finds the position of the first occurrence of a substring in a string
Traits
Properties
protected | $encoding | from UsesEncoding | |
protected | $needle | ||
protected | $offset |
Methods
__construct(string $needle, bool $last = false, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
static PositionOf
first(string $needle, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
static PositionOf
last(string $needle, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
static PositionOf
make(string $needle, bool $last = false, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
mixed
mutate(mixed $value)
Mutate the input value.
Details
__construct(string $needle, bool $last = false, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
static PositionOf
first(string $needle, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
protected string|null
getEncoding(string $input = null)
No description
static PositionOf
last(string $needle, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
static PositionOf
make(string $needle, bool $last = false, int $offset = 0, bool $caseSensitive = true, string $encoding = null)
No description
mixed
mutate(mixed $value)
Mutate the input value.
protected string
resolveStringInput(mixed $value)
No description
protected void
setEncoding(string|null $encoding)
No description
protected void
validateEncoding(string|null $encoding)
No description