- class
Scanner(php\util\Scanner) - package
std - source
php/util/Scanner.php
Description
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): voidhasNext(php\util\Regex $pattern): boolnext(php\util\Regex $pattern): string|nullnextLine(): string|nullhasNextLine(): boolnextInt(null|int $radix): int|nullhasNextInt(null|int $radix): boolnextDouble(): float|nullhasNextDouble(): boolskip(php\util\Regex $pattern): booluseDelimiter(php\util\Regex $delimiter): ScanneruseLocale(php\util\Locale $locale): ScanneruseRadix(int $value): ScannergetIOException(): IOException|nullGet the last io exception (if does not occur then returns null)
reset(): voidResets 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(): stringUses the result of the last called next() method
key(): intvalid(): boolrewind(): voidIterator of the scanner can be used only one time
__clone(): voidThe scanner cannot be cloned