Skip to content

Add a method for joining an iterable of &strs while appending newlines to those that don't already end with one #7

@jwodder

Description

@jwodder
  • Technically, the "iterable of &strs" should be I: IntoIterator, I::Item: AsRef<str>.

  • Possible parameters (in addition to the iterable):

    • Option 1: A single Newline, to append to those strings that don't already end with it
    • Option 2: A Newline and a NewlineSet; the Newline is appended to those strings that don't already end with a newline in the NewlineSet
  • Possible return types:

    • Option 1: Return a String (requires std)
    • Option 2: Return an iterable containing the same elements as the original but with a newline yielded after each string that doesn't already end with a newline (doesn't require std)

Cf. #13

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