Skip to content

String extension case functions behaving unexpectedly for "vitaminB3" #31

@bradwbradw

Description

@bradwbradw
let nutrient = "vitaminB3"
print(nutrient.startCase)

// prints "Vitamin 3", but I expected "Vitamin B3"

A similar thing happens for snakeCase. I've gone and inspected Cent's internal .words() function, and it seems to be the culprit, since the array would be ["vitamin", "3"] instead of ["vitamin", "B3"]

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