Skip to content

Latest commit

 

History

History
227 lines (159 loc) · 3.5 KB

Scanner.ru.md

File metadata and controls

227 lines (159 loc) · 3.5 KB

Scanner

  • класс 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()

__construct(string|Stream $source, string|null $charset): void

hasNext()

hasNext(php\util\Regex $pattern): bool

next()

next(php\util\Regex $pattern): string|null

nextLine()

nextLine(): string|null

hasNextLine()

hasNextLine(): bool

nextInt()

nextInt(null|int $radix): int|null

hasNextInt()

hasNextInt(null|int $radix): bool

nextDouble()

nextDouble(): float|null

hasNextDouble()

hasNextDouble(): bool

skip()

skip(php\util\Regex $pattern): bool

useDelimiter()

useDelimiter(php\util\Regex $delimiter): Scanner

useLocale()

useLocale(php\util\Locale $locale): Scanner

useRadix()

useRadix(int $value): Scanner

getIOException()

getIOException(): IOException|null

Get the last io exception (if does not occur then returns null)


reset()

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()

current(): string

Uses the result of the last called next() method


key()

key(): int

valid()

valid(): bool

rewind()

rewind(): void

Iterator of the scanner can be used only one time


__clone()

__clone(): void

The scanner cannot be cloned