Skip to content

Cases with a single name throws an exception #10

@gabrielalack

Description

@gabrielalack

Hi,

So I tried using your library to parse customer names coming in from an online ordering system.

Some names tend to just be one word, like "Henry". Your library throws an exception and halts execution if I try to get a last name from cases where there is only a single word. Why not just return ""? Or maybe an option for how strict it should be when returning name parts?

Like
level 1, halt for all missing pieces
level 2, just return empty string for missing pieces with no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions