- класс
Scanner
(php\util\Scanner
) - пакет
std
- исходники
php/util/Scanner.php
Описание
A simple text scanner which can parse primitive types and strings using regular expressions.
Class Scanner
->
__construct()
->
hasNext()
->
next()
->
nextLine()
->
hasNextLine()
->
nextInt()
->
hasNextInt()
->
nextDouble()
->
hasNextDouble()
->
skip()
->
useDelimiter()
->
useLocale()
->
useRadix()
->
getIOException()
- Get the last io exception (if does not occur then returnsnull
)->
reset()
- Resets this scanner.->
current()
- Uses the result of the last callednext()
method->
key()
->
valid()
->
rewind()
- Iterator of the scanner can be used only one time->
__clone()
- The scanner cannot be cloned
__construct(string|Stream $source, string|null $charset): void
hasNext(php\util\Regex $pattern): bool
next(php\util\Regex $pattern): string|null
nextLine(): string|null
hasNextLine(): bool
nextInt(null|int $radix): int|null
hasNextInt(null|int $radix): bool
nextDouble(): float|null
hasNextDouble(): bool
skip(php\util\Regex $pattern): bool
useDelimiter(php\util\Regex $delimiter): Scanner
useLocale(php\util\Locale $locale): Scanner
useRadix(int $value): Scanner
getIOException(): IOException|null
Get the last io exception (if does not occur then returns null
)
reset(): void
Resets this scanner.
Resetting a scanner discards all of its explicit state
information which may have been changed by invocations of
useDelimiter()
, useLocale()
, or useRadix()
.
current(): string
Uses the result of the last called next()
method
key(): int
valid(): bool
rewind(): void
Iterator of the scanner can be used only one time
__clone(): void
The scanner cannot be cloned