Skip to content

Add a method for appending a newline to a string if it doesn't already end with one #13

@jwodder

Description

@jwodder
  • Possible string inputs & outputs:

    • Option 1: Take a &mut String, return nothing
    • Option 2: Take a &'a str and return Cow<'a, str>
  • Possible newline parameters:

    • Option 1: A single Newline, to append if the string doesn't already end with it
    • Option 2: A Newline and a NewlineSet; the Newline is appended to the string if it doesn't already end with a newline in the NewlineSet

Cf. #7

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request thereforunder considerationDev has not yet decided whether or how to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions