Skip to content

Add String.splitAt(index) #177

Open
Open
@passsy

Description

@passsy

Proposal:

Add a splitAt method to String extensions. This method splits a string into two parts at the specified index.

API:

List<String> splitAt(int index);

Example:

final result = "hello".splitAt(2);
// result: ["he", "llo"]

// Example with destructuring
final [firstPart, secondPart] = "hello".splitAt(2);
// firstPart: "he"
// secondPart: "llo"

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