Skip to content

Implement Try Method  #334

@AdamSpeight2008

Description

@AdamSpeight2008

It is a fairly common pattern to see CanGetChar closely followed by a call to the following methods.

PeekChar
GetChar
PeekAheadChar

So I think it could be beneficial to have a Try variant of those methods.

TryPeekChar
TryGetChar
TryPeekChar

It also allow us to the "cache" the character, thus not paying the penalty of multiple call to PeekAheadChar

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions