Skip to content

Method to make things possessive and visa-versa (Possessivize?) #370

Open
@davidmurdoch

Description

@davidmurdoch
var name = "Jesus"
var message = string.Format("It is {0} birthday!", name.Possessivize());
// message == "It is Jesus' Birthday"

var name = "David"
var message = string.Format("It is {0} birthday!", name.Possessivize());
// message == "It is David's Birthday"

Of course, I know different style guides treat possessive forms differently, so this would need to have a configuration option.

For instance:
Some style guides the possessive form of Illinois should be Illinois' because it ends with an s, some say it should be Illinois's because all possessive nouns get the 's treatment, some say it should be Illinois's because the "s" is silent, thus the "s" in the `'s' would be pronounced.

I imaging it can get even stranger if you want a possessive plural (proper) noun that ends with an s, like Jones, e.g., "Let's go to the Joneses' house".

Note: I can't think of a word denotes the opposite of being possessive.

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